[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150325105535.GA10932@node.dhcp.inet.fi>
Date: Wed, 25 Mar 2015 12:55:35 +0200
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Hugh Dickins <hughd@...gle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Dave Hansen <dave.hansen@...el.com>,
Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
Vlastimil Babka <vbabka@...e.cz>,
Christoph Lameter <cl@...two.org>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Steve Capper <steve.capper@...aro.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.cz>,
Jerome Marchand <jmarchan@...hat.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 00/16] Sanitize usage of ->flags and ->mapping for tail
pages
On Tue, Mar 24, 2015 at 04:42:48PM -0700, Hugh Dickins wrote:
> On Mon, 23 Mar 2015, Kirill A. Shutemov wrote:
> > Yes, it works until some sound driver decide it wants to use
> > page->mappging.
>
> (a) Why would it want to use page->mapping?
No idea.
> (b) What's the problem if it wants to use page->mapping?
It would need to be initalized for all subpages to get core mm see correct
value. And this doesn't match with current ->mapping users of __GFP_COMP
page (THP and hugetlb) which initialize ->mapping only for head pages.
> (c) Or perhaps some __GFP_COMP driver does already use page->mapping?
I haven't found any.
> > It's just pure luck that it happened to work in this particular case.
>
> We were lucky that it fitted together without needing extra code, yes.
> But this didn't happen by accident, it was known and considered.
I don't agree it was considered well enough.
> > You only need to pay the expense if you hit tail page which is very rare
> > in current kernel. I think we can pay this cost for correctness.
>
> But it's correct as is.
See above.
> >
> > We will shave some cost of compound_head() if/when my refcounting patchset
> > get merged: no need of barrier anymore.
>
> And if these changes are necessary for that, sure, go ahead:
> but as part of that work.
I believe the patchset has value by its own. And having it merged makes my
life easier. But up to Andrew.
--
Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists