linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] mm: hugetlb: add arch hook for clearing page flags before entering pool
Date: Thu, 23 Aug 2012 18:36:02 +0100	[thread overview]
Message-ID: <20120823173602.GA3117@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <20120823171156.GE19968@dhcp22.suse.cz>

On Thu, Aug 23, 2012 at 06:11:56PM +0100, Michal Hocko wrote:
> On Thu 23-08-12 17:37:13, Will Deacon wrote:
> > The core page allocator ensures that page flags are zeroed when freeing
> > pages via free_pages_check. A number of architectures (ARM, PPC, MIPS)
> > rely on this property to treat new pages as dirty with respect to the
> > data cache and perform the appropriate flushing before mapping the pages
> > into userspace.
> > 
> > This can lead to cache synchronisation problems when using hugepages,
> > since the allocator keeps its own pool of pages above the usual page
> > allocator and does not reset the page flags when freeing a page into
> > the pool.
> > 
> > This patch adds a new architecture hook, arch_clear_hugepage_flags, so
> > that architectures which rely on the page flags being in a particular
> > state for fresh allocations can adjust the flags accordingly when a
> > page is freed into the pool.
> > 
> > Cc: Michal Hocko <mhocko@suse.cz>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> 
> Looks good to me
> Reviewed-by: Michal Hocko <mhocko@suse.cz>

Cheers Michal. Next step: start posting the ARM code!

Will

--
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-08-23 17:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 16:37 [PATCH v2] mm: hugetlb: add arch hook for clearing page flags before entering pool Will Deacon
2012-08-23 17:11 ` Michal Hocko
2012-08-23 17:36   ` Will Deacon [this message]
2012-08-24 22:01     ` Andrew Morton

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=20120823173602.GA3117@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    /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).