lkml.org 
[lkml]   [2012]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [patch v2] hugetlb: correct page offset index for sharing pmd
From
On Thu, Aug 16, 2012 at 7:03 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:

> Don't be too concerned about the size of a change - it's the end result
> which matters. If a larger patch results in a better end result, then
> do the larger patch.

Hi Andrew,

This work was triggered by the fact that huge_pmd_share mismatches
unmap_ref_private. But it does match hugetlb_vmtruncate_list.

Plus RADIX_INDEX and HEAP_INDEX are defined, and used when inserting
vma into prio tree.
===
/*
* The following macros are used for implementing prio_tree for i_mmap
*/

#define RADIX_INDEX(vma) ((vma)->vm_pgoff)
#define VMA_SIZE(vma) (((vma)->vm_end - (vma)->vm_start) >> PAGE_SHIFT)
/* avoid overflow */
#define HEAP_INDEX(vma) ((vma)->vm_pgoff + (VMA_SIZE(vma) - 1))
===

Thus it is incorrect to use huge pgoff in searching vma in prio tree, and
I have to withdraw this work.

Thanks,
Hillf


\
 
 \ /
  Last update: 2012-08-16 15:22    [W:3.717 / U:1.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site