lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150516231732.GA13265@node.dhcp.inet.fi>
Date:	Sun, 17 May 2015 02:17:32 +0300
From:	"Kirill A. Shutemov" <kirill@...temov.name>
To:	Dave Hansen <dave.hansen@...el.com>
Cc:	Vlastimil Babka <vbabka@...e.cz>,
	"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Hugh Dickins <hughd@...gle.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 07:57:39AM -0700, Dave Hansen wrote:
> On 05/15/2015 04:18 AM, Kirill A. Shutemov wrote:
> >> > 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.
> 
> What code are you talking about here, specifically?  This?
> 
> static inline int hpage_nr_pages(struct page *page)
> {
>         if (unlikely(PageTransHuge(page)))
>                 return HPAGE_PMD_NR;
>         return 1;
> }

No. See for instance mem_cgroup_try_charge(). Vlastimil would like to
replace hpage_nr_pages() call with plain HPAGE_PMD_NR.

-- 
 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ