[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <017501d24aee$d9a189c0$8ce49d40$@alibaba-inc.com>
Date: Wed, 30 Nov 2016 17:48:05 +0800
From: "Hillf Danton" <hillf.zj@...baba-inc.com>
To: "'Kirill A. Shutemov'" <kirill.shutemov@...ux.intel.com>,
"'Theodore Ts'o'" <tytso@....edu>,
"'Andreas Dilger'" <adilger.kernel@...ger.ca>,
"'Jan Kara'" <jack@...e.com>,
"'Andrew Morton'" <akpm@...ux-foundation.org>
Cc: "'Alexander Viro'" <viro@...iv.linux.org.uk>,
"'Hugh Dickins'" <hughd@...gle.com>,
"'Andrea Arcangeli'" <aarcange@...hat.com>,
"'Dave Hansen'" <dave.hansen@...el.com>,
"'Vlastimil Babka'" <vbabka@...e.cz>,
"'Matthew Wilcox'" <willy@...radead.org>,
"'Ross Zwisler'" <ross.zwisler@...ux.intel.com>,
<linux-ext4@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-block@...r.kernel.org>,
"'Naoya Horiguchi'" <n-horiguchi@...jp.nec.com>
Subject: Re: [PATCHv5 22/36] mm, hugetlb: switch hugetlbfs to multi-order radix-tree entries
On Tuesday, November 29, 2016 7:23 PM Kirill A. Shutemov wrote:
> @@ -607,10 +605,10 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset,
> }
>
> /* Set numa allocation policy based on index */
> - hugetlb_set_vma_policy(&pseudo_vma, inode, index);
> + hugetlb_set_vma_policy(&pseudo_vma, inode, index >> huge_page_order(h));
>
> /* addr is the offset within the file (zero based) */
> - addr = index * hpage_size;
> + addr = index << PAGE_SHIFT & ~huge_page_mask(h);
>
> /* mutex taken here, fault path and hole punch */
> hash = hugetlb_fault_mutex_hash(h, mm, &pseudo_vma, mapping,
Seems we can't use index in computing hash as long as it isn't in huge page size.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists