mm: vmscan: naming fixes: global_reclaim() and sane_reclaim()
authorJohannes Weiner <hannes@cmpxchg.org>
Sun, 1 Dec 2019 01:55:40 +0000 (17:55 -0800)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 17 Jan 2024 17:15:53 +0000 (18:15 +0100)
commitb9eeb5067bbbe6574bb313f49ab43be060d7bd94
tree964a4409a7d7890ada98fe046645d9f873a1eef6
parent7fdc110b27e78de1a3b7ce38d1bfe276dab0fe4a
mm: vmscan: naming fixes: global_reclaim() and sane_reclaim()

Seven years after introducing the global_reclaim() function, I still have
to double take when reading a callsite.  I don't know how others do it,
this is a terrible name.

Invert the meaning and rename it to cgroup_reclaim().

[ After all, "global reclaim" is just regular reclaim invoked from the
  page allocator. It's reclaim on behalf of a cgroup limit that is a
  special case of reclaim, and should be explicit - not the reverse. ]

sane_reclaim() isn't very descriptive either: it tests whether we can use
the regular writeback throttling - available during regular page reclaim
or cgroup2 limit reclaim - or need to use the broken
wait_on_page_writeback() method.  Use "writeback_throttling_sane()".

Link: http://lkml.kernel.org/r/20191022144803.302233-5-hannes@cmpxchg.org
Change-Id: Ie173107736712471293c47ee9692c3a98b4ca7da
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Roman Gushchin <guro@fb.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[backport of the commit b5ead35e7e1d3434ce436dfcb2af32820ce54589 from mainline]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
mm/vmscan.c