lkml.org 
[lkml]   [2012]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tmpfs not interleaving properly
(5/31/12 4:25 PM), Andrew Morton wrote:
> On Thu, 31 May 2012 16:09:15 -0400
> KOSAKI Motohiro<kosaki.motohiro@gmail.com> wrote:
>
>>> --- a/mm/shmem.c
>>> +++ b/mm/shmem.c
>>> @@ -929,7 +929,7 @@ static struct page *shmem_alloc_page(gfp_t gfp,
>>> /*
>>> * alloc_page_vma() will drop the shared policy reference
>>> */
>>> - return alloc_page_vma(gfp,&pvma, 0);
>>> + return alloc_page_vma(gfp,&pvma, info->node_offset<< PAGE_SHIFT );
>>
>> 3rd argument of alloc_page_vma() is an address. This is type error.
>
> Well, it's an unsigned long...
>
> But yes, it is conceptually wrong and *looks* weird. I think we can
> address that by overcoming our peculair aversion to documenting our
> code, sigh. This?

Sorry, no.

addr agrument of alloc_pages_vma() have two meanings.

1) interleave node seed
2) look-up key of shmem policy

I think this patch break (2). shmem_get_policy(pol, addr) assume caller honor to
pass correct address.

Oh, yes. *NOW*, we are discussing shmem policy removing. but it haven't be removed.
Please don't break.



\
 
 \ /
  Last update: 2012-05-31 23:01    [W:0.049 / U:0.808 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site