linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Mel Gorman <mgorman@suse.de>,
	Michal Hocko <mhocko@suse.cz>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Hugh Dickins <hughd@google.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Tomasz Stanislawski <t.stanislaws@samsung.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Aaditya Kumar <aaditya.kumar.30@gmail.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	kosaki.motohiro@gmail.com
Subject: Re: [PATCH] mm: fix zone_watermark_ok_safe() accounting of isolated pages
Date: Thu, 20 Dec 2012 12:26:01 -0500	[thread overview]
Message-ID: <50D34A29.4090306@gmail.com> (raw)
In-Reply-To: <20121220005704.GA2556@blaptop>

> 2. Another approach. Let's avoid a branch in free_one_page if we don't enable
>    CONFIG_MEMORY_ISOLATION? It's simpler/less-churning/more accurate/removing
>    unnecessary codes compared to 1.
> 
> index 7e208f0..35c0e82 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -683,8 +683,12 @@ static void free_one_page(struct zone *zone, struct page *page, int order,
>         zone->pages_scanned = 0;
>  
>         __free_one_page(page, zone, order, migratetype);
> +#ifdef CONFIG_MEMORY_ISOLATION
>         if (unlikely(migratetype != MIGRATE_ISOLATE))
>                 __mod_zone_freepage_state(zone, 1 << order, migratetype);
> +#else
> +       __mod_zone_freepage_state(zone, 1 << order, migratetype);
> +#endif
>         spin_unlock(&zone->lock);
>  }
> 
> So I will
> 
> Acked-by: Minchan Kim <minchan@kernel.org>
> 
> Then, will send 2 as follow-up patch soon if anyone doesn't oppose.

I agree. I guess we can remove this branch completely from free page fast path.
However your patch is good first step.


--
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>

      reply	other threads:[~2012-12-20 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18  9:18 [PATCH] mm: fix zone_watermark_ok_safe() accounting of isolated pages Bartlomiej Zolnierkiewicz
2012-12-20  0:57 ` Minchan Kim
2012-12-20 17:26   ` KOSAKI Motohiro [this message]

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=50D34A29.4090306@gmail.com \
    --to=kosaki.motohiro@gmail.com \
    --cc=aaditya.kumar.30@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=hughd@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=mina86@mina86.com \
    --cc=minchan@kernel.org \
    --cc=t.stanislaws@samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).