Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6638380

Browse files
Matthew Wilcox (Oracle)torvalds
Matthew Wilcox (Oracle)
authored andcommitted
mm: fix madvise WILLNEED performance problem
The calculation of the end page index was incorrect, leading to aregression of 70% when running stress-ng.With this fix, we instead see a performance improvement of 3%.Fixes:e6e8871 ("mm: optimise madvise WILLNEED")Reported-by: kernel test robot <rong.a.chen@intel.com>Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Tested-by: Xing Zhengjun <zhengjun.xing@linux.intel.com>Acked-by: Johannes Weiner <hannes@cmpxchg.org>Cc: William Kucharski <william.kucharski@oracle.com>Cc: Feng Tang <feng.tang@intel.com>Cc: "Chen, Rong A" <rong.a.chen@intel.com>Link:https://lkml.kernel.org/r/20201109134851.29692-1-willy@infradead.orgSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent488dac0 commit6638380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎mm/madvise.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static void force_shm_swapin_readahead(struct vm_area_struct *vma,
226226
structaddress_space*mapping)
227227
{
228228
XA_STATE(xas,&mapping->i_pages,linear_page_index(vma,start));
229-
pgoff_tend_index=end/PAGE_SIZE;
229+
pgoff_tend_index=linear_page_index(vma,end+PAGE_SIZE-1);
230230
structpage*page;
231231

232232
rcu_read_lock();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp