From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx127.postini.com [74.125.245.127]) by kanga.kvack.org (Postfix) with SMTP id E9BF86B005D for ; Thu, 16 Aug 2012 08:40:08 -0400 (EDT) Received: by vbkv13 with SMTP id v13so2886974vbk.14 for ; Thu, 16 Aug 2012 05:40:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20120815160342.5b77bd3b.akpm@linux-foundation.org> References: <20120806132410.GA6150@dhcp22.suse.cz> <20120815160342.5b77bd3b.akpm@linux-foundation.org> Date: Thu, 16 Aug 2012 20:40:07 +0800 Message-ID: Subject: Re: [patch v2] hugetlb: correct page offset index for sharing pmd From: Hillf Danton Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Michal Hocko , Mel Gorman , Linux-MM , LKML On Thu, Aug 16, 2012 at 7:03 AM, Andrew Morton 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org