Skip to content

Commit 8667982

Browse files
gormanmtorvalds
authored andcommitted
mm, pagevec: remove cold parameter for pagevecs
Every pagevec_init user claims the pages being released are hot even in cases where it is unlikely the pages are hot. As no one cares about the hotness of pages being released to the allocator, just ditch the parameter. No performance impact is expected as the overhead is marginal. The parameter is removed simply because it is a bit stupid to have a useless parameter copied everywhere. Link: http://lkml.kernel.org/r/20171018075952.10627-6-mgorman@techsingularity.net Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Andi Kleen <ak@linux.intel.com> Cc: Dave Chinner <david@fromorbit.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Jan Kara <jack@suse.cz> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d9ed0d0 commit 8667982

24 files changed

Lines changed: 45 additions & 47 deletions

File tree

‎drivers/gpu/drm/i915/i915_gem_gtt.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ static void i915_address_space_init(struct i915_address_space *vm,
18591859
INIT_LIST_HEAD(&vm->unbound_list);
18601860

18611861
list_add_tail(&vm->global_link, &dev_priv->vm_list);
1862-
pagevec_init(&vm->free_pages, false);
1862+
pagevec_init(&vm->free_pages);
18631863
}
18641864

18651865
static void i915_address_space_fini(struct i915_address_space *vm)

‎fs/afs/write.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static void afs_kill_pages(struct afs_vnode *vnode, bool error,
308308
_enter("{%x:%u},%lx-%lx",
309309
vnode->fid.vid, vnode->fid.vnode, first, last);
310310

311-
pagevec_init(&pv, 0);
311+
pagevec_init(&pv);
312312

313313
do {
314314
_debug("kill %lx-%lx", first, last);
@@ -602,7 +602,7 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
602602

603603
ASSERT(wb != NULL);
604604

605-
pagevec_init(&pv, 0);
605+
pagevec_init(&pv);
606606

607607
do {
608608
_debug("done %lx-%lx", first, last);

‎fs/btrfs/extent_io.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3797,7 +3797,7 @@ int btree_write_cache_pages(struct address_space *mapping,
37973797
int scanned = 0;
37983798
int tag;
37993799

3800-
pagevec_init(&pvec, 0);
3800+
pagevec_init(&pvec);
38013801
if (wbc->range_cyclic) {
38023802
index = mapping->writeback_index; /* Start from prev offset */
38033803
end = -1;
@@ -3936,7 +3936,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
39363936
if (!igrab(inode))
39373937
return 0;
39383938

3939-
pagevec_init(&pvec, 0);
3939+
pagevec_init(&pvec);
39403940
if (wbc->range_cyclic) {
39413941
index = mapping->writeback_index; /* Start from prev offset */
39423942
end = -1;

‎fs/buffer.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ void clean_bdev_aliases(struct block_device *bdev, sector_t block, sector_t len)
15921592
struct buffer_head *head;
15931593

15941594
end = (block + len - 1) >> (PAGE_SHIFT - bd_inode->i_blkbits);
1595-
pagevec_init(&pvec, 0);
1595+
pagevec_init(&pvec);
15961596
while (pagevec_lookup_range(&pvec, bd_mapping, &index, end)) {
15971597
count = pagevec_count(&pvec);
15981598
for (i = 0; i < count; i++) {
@@ -3514,7 +3514,7 @@ page_cache_seek_hole_data(struct inode *inode, loff_t offset, loff_t length,
35143514
if (length <= 0)
35153515
return -ENOENT;
35163516

3517-
pagevec_init(&pvec, 0);
3517+
pagevec_init(&pvec);
35183518

35193519
do {
35203520
unsigned nr_pages, i;

‎fs/cachefiles/rdwr.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op,
710710
/* calculate the shift required to use bmap */
711711
shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits;
712712

713-
pagevec_init(&pagevec, 0);
713+
pagevec_init(&pagevec);
714714

715715
op->op.flags &= FSCACHE_OP_KEEP_FLAGS;
716716
op->op.flags |= FSCACHE_OP_ASYNC;
@@ -844,7 +844,7 @@ int cachefiles_allocate_pages(struct fscache_retrieval *op,
844844

845845
ret = cachefiles_has_space(cache, 0, *nr_pages);
846846
if (ret == 0) {
847-
pagevec_init(&pagevec, 0);
847+
pagevec_init(&pagevec);
848848

849849
list_for_each_entry(page, pages, lru) {
850850
if (pagevec_add(&pagevec, page) == 0)

‎fs/ceph/addr.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ static void ceph_release_pages(struct page **pages, int num)
680680
struct pagevec pvec;
681681
int i;
682682

683-
pagevec_init(&pvec, 0);
683+
pagevec_init(&pvec);
684684
for (i = 0; i < num; i++) {
685685
if (pagevec_add(&pvec, pages[i]) == 0)
686686
pagevec_release(&pvec);
@@ -811,7 +811,7 @@ static int ceph_writepages_start(struct address_space *mapping,
811811
if (fsc->mount_options->wsize < wsize)
812812
wsize = fsc->mount_options->wsize;
813813

814-
pagevec_init(&pvec, 0);
814+
pagevec_init(&pvec);
815815

816816
start_index = wbc->range_cyclic ? mapping->writeback_index : 0;
817817
index = start_index;

‎fs/dax.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ int dax_writeback_mapping_range(struct address_space *mapping,
794794

795795
tag_pages_for_writeback(mapping, start_index, end_index);
796796

797-
pagevec_init(&pvec, 0);
797+
pagevec_init(&pvec);
798798
while (!done) {
799799
pvec.nr = find_get_entries_tag(mapping, start_index,
800800
PAGECACHE_TAG_TOWRITE, PAGEVEC_SIZE,

‎fs/ext4/inode.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ static void mpage_release_unused_pages(struct mpage_da_data *mpd,
17191719
ext4_es_remove_extent(inode, start, last - start + 1);
17201720
}
17211721

1722-
pagevec_init(&pvec, 0);
1722+
pagevec_init(&pvec);
17231723
while (index <= end) {
17241724
nr_pages = pagevec_lookup_range(&pvec, mapping, &index, end);
17251725
if (nr_pages == 0)
@@ -2345,7 +2345,7 @@ static int mpage_map_and_submit_buffers(struct mpage_da_data *mpd)
23452345
lblk = start << bpp_bits;
23462346
pblock = mpd->map.m_pblk;
23472347

2348-
pagevec_init(&pvec, 0);
2348+
pagevec_init(&pvec);
23492349
while (start <= end) {
23502350
nr_pages = pagevec_lookup_range(&pvec, inode->i_mapping,
23512351
&start, end);
@@ -2616,7 +2616,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd)
26162616
else
26172617
tag = PAGECACHE_TAG_DIRTY;
26182618

2619-
pagevec_init(&pvec, 0);
2619+
pagevec_init(&pvec);
26202620
mpd->map.m_len = 0;
26212621
mpd->next_page = index;
26222622
while (index <= end) {

‎fs/f2fs/checkpoint.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ long sync_meta_pages(struct f2fs_sb_info *sbi, enum page_type type,
314314
};
315315
struct blk_plug plug;
316316

317-
pagevec_init(&pvec, 0);
317+
pagevec_init(&pvec);
318318

319319
blk_start_plug(&plug);
320320

‎fs/f2fs/data.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,7 @@ static int f2fs_write_cache_pages(struct address_space *mapping,
16351635
int range_whole = 0;
16361636
int tag;
16371637

1638-
pagevec_init(&pvec, 0);
1638+
pagevec_init(&pvec);
16391639

16401640
if (get_dirty_pages(mapping->host) <=
16411641
SM_I(F2FS_M_SB(mapping))->min_hot_blocks)

0 commit comments

Comments
 (0)