]> git.baikalelectronics.ru Git - kernel.git/commit
mm: implement find_get_pages_range()
authorJan Kara <jack@suse.cz>
Wed, 6 Sep 2017 23:21:21 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 00:27:26 +0000 (17:27 -0700)
commitfc28bec5b3fd811dcb0b7e23d4d0769829624eaa
tree1a6791039e7d4b5a822445598b94aa71162dd65a
parent113c1a5264e42dce84e3d8798e52591024bb4348
mm: implement find_get_pages_range()

Implement a variant of find_get_pages() that stops iterating at given
index.  This may be substantial performance gain if the mapping is
sparse.  See following commit for details.  Furthermore lots of users of
this function (through pagevec_lookup()) actually want a range lookup
and all of them are currently open-coding this.

Also create corresponding pagevec_lookup_range() function.

Link: http://lkml.kernel.org/r/20170726114704.7626-4-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/pagemap.h
include/linux/pagevec.h
mm/filemap.c
mm/swap.c