From: Andrew Morton <akpm@linux-foundation.org>
To: Will Deacon <will.deacon@arm.com>
Cc: Michal Hocko <mhocko@suse.cz>,
"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>
Subject: Re: [PATCH v2] mm: hugetlb: add arch hook for clearing page flags before entering pool
Date: Fri, 24 Aug 2012 15:01:54 -0700 [thread overview]
Message-ID: <20120824150154.fc16a78e.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120823173602.GA3117@mudshark.cambridge.arm.com>
On Thu, 23 Aug 2012 18:36:02 +0100
Will Deacon <will.deacon@arm.com> wrote:
> 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.
You could have used __weak here quite neatly, but whatever.
> Next step: start posting the ARM code!
I suggest you keep this patch in whichever tree holds that arm code. If
I see this patch turn up in linux-next then I'll just drop my copy,
expecting that this patch will be merged alongside the ARM changes.
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Will Deacon <will.deacon@arm.com>
Cc: Michal Hocko <mhocko@suse.cz>,
"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>
Subject: Re: [PATCH v2] mm: hugetlb: add arch hook for clearing page flags before entering pool
Date: Fri, 24 Aug 2012 15:01:54 -0700 [thread overview]
Message-ID: <20120824150154.fc16a78e.akpm@linux-foundation.org> (raw)
Message-ID: <20120824220154.z1RsLvNfPoyF7_F04jBvqkNmrYe8sdmVfADXDL4i14o@z> (raw)
In-Reply-To: <20120823173602.GA3117@mudshark.cambridge.arm.com>
On Thu, 23 Aug 2012 18:36:02 +0100
Will Deacon <will.deacon@arm.com> wrote:
> 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.
You could have used __weak here quite neatly, but whatever.
> Next step: start posting the ARM code!
I suggest you keep this patch in whichever tree holds that arm code. If
I see this patch turn up in linux-next then I'll just drop my copy,
expecting that this patch will be merged alongside the ARM changes.
next prev parent reply other threads:[~2012-08-24 22:01 UTC|newest]
Thread overview: 8+ 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 16:37 ` Will Deacon
2012-08-23 17:11 ` Michal Hocko
2012-08-23 17:11 ` Michal Hocko
2012-08-23 17:36 ` Will Deacon
2012-08-23 17:36 ` Will Deacon
2012-08-24 22:01 ` Andrew Morton [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=20120824150154.fc16a78e.akpm@linux-foundation.org \
--to=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 \
--cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.