Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86679820 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds
Browse files

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: default avatarMel Gorman <mgorman@techsingularity.net>
Acked-by: default avatarVlastimil 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d9ed0d08
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1859,7 +1859,7 @@ static void i915_address_space_init(struct i915_address_space *vm,
	INIT_LIST_HEAD(&vm->unbound_list);

	list_add_tail(&vm->global_link, &dev_priv->vm_list);
	pagevec_init(&vm->free_pages, false);
	pagevec_init(&vm->free_pages);
}

static void i915_address_space_fini(struct i915_address_space *vm)
+2 −2
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ static void afs_kill_pages(struct afs_vnode *vnode, bool error,
	_enter("{%x:%u},%lx-%lx",
	       vnode->fid.vid, vnode->fid.vnode, first, last);

	pagevec_init(&pv, 0);
	pagevec_init(&pv);

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

	ASSERT(wb != NULL);

	pagevec_init(&pv, 0);
	pagevec_init(&pv);

	do {
		_debug("done %lx-%lx", first, last);
+2 −2
Original line number Diff line number Diff line
@@ -3797,7 +3797,7 @@ int btree_write_cache_pages(struct address_space *mapping,
	int scanned = 0;
	int tag;

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

	pagevec_init(&pvec, 0);
	pagevec_init(&pvec);
	if (wbc->range_cyclic) {
		index = mapping->writeback_index; /* Start from prev offset */
		end = -1;
+2 −2
Original line number Diff line number Diff line
@@ -1592,7 +1592,7 @@ void clean_bdev_aliases(struct block_device *bdev, sector_t block, sector_t len)
	struct buffer_head *head;

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

	pagevec_init(&pvec, 0);
	pagevec_init(&pvec);

	do {
		unsigned nr_pages, i;
+2 −2
Original line number Diff line number Diff line
@@ -710,7 +710,7 @@ int cachefiles_read_or_alloc_pages(struct fscache_retrieval *op,
	/* calculate the shift required to use bmap */
	shift = PAGE_SHIFT - inode->i_sb->s_blocksize_bits;

	pagevec_init(&pagevec, 0);
	pagevec_init(&pagevec);

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

	ret = cachefiles_has_space(cache, 0, *nr_pages);
	if (ret == 0) {
		pagevec_init(&pagevec, 0);
		pagevec_init(&pagevec);

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