lkml.org 
[lkml]   [2015]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv5 03/28] memcg: adjust to support new THP refcounting
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;
}



\
 
 \ /
  Last update: 2015-05-15 19:01    [W:0.148 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site