From: Haojian Zhuang <haojian.zhuang@gmail.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
mgorman@suse.de
Subject: Re: [PATCH] mm: vmscan: decrease cma pages from nr_reclaimed
Date: Tue, 13 Aug 2013 07:43:24 +0800 [thread overview]
Message-ID: <CAN1soZxZyG4t=4M1pVZGMnR3twThsBKezx5dKy7uw68BwLRR-w@mail.gmail.com> (raw)
In-Reply-To: <52092FB5.3060300@intel.com>
On Tue, Aug 13, 2013 at 2:55 AM, Dave Hansen <dave.hansen@intel.com> 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@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-08-12 23:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 15:51 Haojian Zhuang
2013-08-12 18:55 ` Dave Hansen
2013-08-12 23:43 ` Haojian Zhuang [this message]
2013-08-13 1:07 ` [PATCH v2] " Haojian Zhuang
2013-08-13 1:35 ` Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAN1soZxZyG4t=4M1pVZGMnR3twThsBKezx5dKy7uw68BwLRR-w@mail.gmail.com' \
--to=haojian.zhuang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox