[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150515111828.GC6250@node.dhcp.inet.fi>
Date: Fri, 15 May 2015 14:18:28 +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 03/28] memcg: adjust to support new THP refcounting
On Fri, May 15, 2015 at 09:44:17AM +0200, Vlastimil Babka wrote:
> On 04/23/2015 11:03 PM, Kirill A. Shutemov wrote:
> >As with rmap, with new refcounting we cannot rely on PageTransHuge() to
> >check if we need to charge size of huge page form the cgroup. We need to
> >get information from caller to know whether it was mapped with PMD or
> >PTE.
> >
> >We do uncharge when last reference on the page gone. At that point if we
> >see PageTransHuge() it means we need to unchange whole huge page.
> >
> >The tricky part is partial unmap -- when we try to unmap part of huge
> >page. We don't do a special handing of this situation, meaning we don't
> >uncharge the part of huge page unless last user is gone or
> >split_huge_page() is triggered. In case of cgroup memory pressure
> >happens the partial unmapped page will be split through shrinker. This
> >should be good enough.
> >
> >Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> >Tested-by: Sasha Levin <sasha.levin@...cle.com>
>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
>
> But same question about whether it should be using hpage_nr_pages() instead
> of a constant.
No. Compiler woundn't be able to optimize HPAGE_PMD_NR away for THP=n,
since compound value cross compilation unit barrier.
--
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