[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150519040032.GB5795@node.dhcp.inet.fi>
Date: Tue, 19 May 2015 07:00:32 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Hugh Dickins <hughd@...gle.com>,
Dave Hansen <dave.hansen@...el.com>,
Mel Gorman <mgorman@...e.de>, Rik van Riel <riel@...hat.com>,
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>,
Sasha Levin <sasha.levin@...cle.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCHv5 20/28] mm: differentiate page_mapped() from
page_mapcount() for compound pages
On Mon, May 18, 2015 at 05:35:16PM +0200, Vlastimil Babka wrote:
> On 04/23/2015 11:03 PM, Kirill A. Shutemov wrote:
> >Let's define page_mapped() to be true for compound pages if any
> >sub-pages of the compound page is mapped (with PMD or PTE).
> >
> >On other hand page_mapcount() return mapcount for this particular small
> >page.
> >
> >This will make cases like page_get_anon_vma() behave correctly once we
> >allow huge pages to be mapped with PTE.
> >
> >Most users outside core-mm should use page_mapcount() instead of
> >page_mapped().
>
> Does "should" mean that they do that now, or just that you would like them
> to?
I would like them to.
> Should there be a warning before the function then?
Ok.
> >Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> >Tested-by: Sasha Levin <sasha.levin@...cle.com>
>
> >--- a/include/linux/mm.h
> >+++ b/include/linux/mm.h
> >@@ -909,7 +909,16 @@ static inline pgoff_t page_file_index(struct page *page)
>
> (not shown in the diff)
>
> * Return true if this page is mapped into pagetables.
> > */
>
> Expand the comment? Especially if you put compound_head() there.
Ok.
> > static inline int page_mapped(struct page *page)
>
> Convert to proper bool while at it?
Ok.
--
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