lkml.org 
[lkml]   [2016]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] mm: Change the data type of huge page size from unsigned long to u64
From
Date
On 9/13/16 5:32 PM, Kirill A. Shutemov wrote:
> On Tue, Sep 13, 2016 at 05:26:05PM +0800, Rui Teng wrote:
>> The huge page size could be 16G(0x400000000) on ppc64 architecture, and it will
>> cause an overflow on unsigned long data type(0xFFFFFFFF).
>
> Huh? ppc64 is 64-bit system and sizeof(void *) is equal to
> sizeof(unsigned long) on Linux (LP64 model).
>
> So where your 0xFFFFFFFF comes from?
>
The size of unsigned long data type is 4 bytes, and the 0xFFFFFFFF here
is the maximum value. And 16G is bigger than it.

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.083 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site