From: Michal Hocko <mhocko@suse.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: Remove unused pgdat_reclaimable_pages()
Date: Wed, 22 Nov 2017 14:04:57 +0100 [thread overview]
Message-ID: <20171122130457.krh2ynk5qzuok47u@dhcp22.suse.cz> (raw)
In-Reply-To: <20171122094416.26019-1-jack@suse.cz>
On Wed 22-11-17 10:44:16, Jan Kara wrote:
> Remove unused function pgdat_reclaimable_pages() and
> node_page_state_snapshot() which becomes unused as well.
It's good to see it go. _snaphost thingy has always been a hack and most
users of pgdat_reclaimable_pages were hackish as well.
> Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> include/linux/swap.h | 1 -
> include/linux/vmstat.h | 17 -----------------
> mm/vmscan.c | 16 ----------------
> 3 files changed, 34 deletions(-)
>
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index c2b8128799c1..bad03a01327a 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -345,7 +345,6 @@ extern void lru_cache_add_active_or_unevictable(struct page *page,
>
> /* linux/mm/vmscan.c */
> extern unsigned long zone_reclaimable_pages(struct zone *zone);
> -extern unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat);
> extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
> gfp_t gfp_mask, nodemask_t *mask);
> extern int __isolate_lru_page(struct page *page, isolate_mode_t mode);
> diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
> index 1779c9817b39..a4c2317d8b9f 100644
> --- a/include/linux/vmstat.h
> +++ b/include/linux/vmstat.h
> @@ -216,23 +216,6 @@ static inline unsigned long zone_page_state_snapshot(struct zone *zone,
> return x;
> }
>
> -static inline unsigned long node_page_state_snapshot(pg_data_t *pgdat,
> - enum node_stat_item item)
> -{
> - long x = atomic_long_read(&pgdat->vm_stat[item]);
> -
> -#ifdef CONFIG_SMP
> - int cpu;
> - for_each_online_cpu(cpu)
> - x += per_cpu_ptr(pgdat->per_cpu_nodestats, cpu)->vm_node_stat_diff[item];
> -
> - if (x < 0)
> - x = 0;
> -#endif
> - return x;
> -}
> -
> -
> #ifdef CONFIG_NUMA
> extern void __inc_numa_state(struct zone *zone, enum numa_stat_item item);
> extern unsigned long sum_zone_node_page_state(int node,
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index c02c850ea349..2b4c37dd77a4 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -220,22 +220,6 @@ unsigned long zone_reclaimable_pages(struct zone *zone)
> return nr;
> }
>
> -unsigned long pgdat_reclaimable_pages(struct pglist_data *pgdat)
> -{
> - unsigned long nr;
> -
> - nr = node_page_state_snapshot(pgdat, NR_ACTIVE_FILE) +
> - node_page_state_snapshot(pgdat, NR_INACTIVE_FILE) +
> - node_page_state_snapshot(pgdat, NR_ISOLATED_FILE);
> -
> - if (get_nr_swap_pages() > 0)
> - nr += node_page_state_snapshot(pgdat, NR_ACTIVE_ANON) +
> - node_page_state_snapshot(pgdat, NR_INACTIVE_ANON) +
> - node_page_state_snapshot(pgdat, NR_ISOLATED_ANON);
> -
> - return nr;
> -}
> -
> /**
> * lruvec_lru_size - Returns the number of pages on the given LRU list.
> * @lruvec: lru vector
> --
> 2.12.3
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2017-11-22 13:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 9:44 Jan Kara
2017-11-22 13:04 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171122130457.krh2ynk5qzuok47u@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox