Re: [PATCH] mm: vmscan: decrease cma pages from nr_reclaimed

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

 



On Tue, Aug 13, 2013 at 2:55 AM, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
> On 08/12/2013 08:51 AM, Haojian Zhuang wrote:
>> @@ -987,6 +991,11 @@ static unsigned long shrink_page_list(struct list_head *page_list,
>>                                        * leave it off the LRU).
>>                                        */
>>                                       nr_reclaimed++;
>> +#ifdef CONFIG_CMA
>> +                                     if (get_pageblock_migratetype(page) ==
>> +                                             MIGRATE_CMA)
>> +                                             nr_reclaimed_cma++;
>> +#endif
>>                                       continue;
>>                               }
>>                       }
>
> Throwing four #ifdefs like that in to any is pretty mean.  Doing it to
> shrink_page_list() is just cruel. :)
>
> Can you think of a way to do this without so many explicit #ifdefs in a
> .c file?

OK. I'll use IS_ENABLED() instead.

--
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/ .
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]