Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754877AbbEOO5m (ORCPT ); Fri, 15 May 2015 10:57:42 -0400 Received: from mga03.intel.com ([134.134.136.65]:2245 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754254AbbEOO5l (ORCPT ); Fri, 15 May 2015 10:57:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,434,1427785200"; d="scan'208";a="494045735" Message-ID: <55560963.30106@intel.com> Date: Fri, 15 May 2015 07:57:39 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "Kirill A. Shutemov" , Vlastimil Babka CC: "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , Hugh Dickins , Mel Gorman , Rik van Riel , Christoph Lameter , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv5 03/28] memcg: adjust to support new THP refcounting References: <1429823043-157133-1-git-send-email-kirill.shutemov@linux.intel.com> <1429823043-157133-4-git-send-email-kirill.shutemov@linux.intel.com> <5555A3D1.3010108@suse.cz> <20150515111828.GC6250@node.dhcp.inet.fi> In-Reply-To: <20150515111828.GC6250@node.dhcp.inet.fi> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 740 Lines: 20 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; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/