Re: [PATCH v2] mm/compaction : do optimazition when the migration scanner gets no page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 13, 2012 at 12:50:37PM +0900, Minchan Kim wrote:
> 
> Okay. If you want it really, How about this?
> Why I insist on is I don't want to change ISOLATE_NONE's semantic.
> It's very clear and readable.
> We should change code itself instead of semantic of ISOLATE_NONE.
> 
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -376,7 +376,7 @@ static isolate_migrate_t isolate_migratepages(struct zone *zone,
>  
>         trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated);
>  
> -       return ISOLATE_SUCCESS;
> +       return cc->nr_migratepages ? ISOLATE_SUCCESS : ISOLATE_NONE;
>  }
>  
>  /*
> @@ -547,6 +547,12 @@ static int compact_zone(struct zone *zone, struct compact_control *cc)
>                         ret = COMPACT_PARTIAL;
>                         goto out;
>                 case ISOLATE_NONE:
> +                       /*
> +                        * If we can't isolate pages at all, we want to
> +                        * trace, still.
> +                        */
> +                       count_vm_event(COMPACTBLOCKS);
> +                       trace_mm_compaction_migratepages(0, 0);
>                         continue;
>                 case ISOLATE_SUCCESS:
>                         ;
> 

This will increment COMPACTBLOCKS and trigger the tracepoint even
when no scanning took place. It only happens with the migration and free
scanner meet so once per full compaction cycle which should be a rare
case. That should be fine.

-- 
Mel Gorman
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]