From: Dave Hansen <dave.hansen@intel.com>
To: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: m.szyprowski@samsung.com, linux-mm@kvack.org,
akpm@linux-foundation.org, mgorman@suse.de
Subject: Re: [PATCH] mm: vmscan: decrease cma pages from nr_reclaimed
Date: Mon, 12 Aug 2013 11:55:49 -0700 [thread overview]
Message-ID: <52092FB5.3060300@intel.com> (raw)
In-Reply-To: <1376322661-20917-1-git-send-email-haojian.zhuang@gmail.com>
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?
--
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 18:55 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 [this message]
2013-08-12 23:43 ` Haojian Zhuang
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=52092FB5.3060300@intel.com \
--to=dave.hansen@intel.com \
--cc=akpm@linux-foundation.org \
--cc=haojian.zhuang@gmail.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