* [patch 043/101] mm, vmscan: avoid passing in `remaining' unnecessarily to prepare_kswapd_sleep()
@ 2016-07-28 22:46 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-28 22:46 UTC (permalink / raw)
To: torvalds, mm-commits, akpm, mgorman, hannes, hillf.zj,
iamjoonsoo.kim, mhocko, minchan, riel, vbabka
From: Mel Gorman <mgorman@techsingularity.net>
Subject: mm, vmscan: avoid passing in `remaining' unnecessarily to prepare_kswapd_sleep()
As pointed out by Minchan Kim, the first call to prepare_kswapd_sleep()
always passes in 0 for `remaining' and the second call can trivially check
the parameter in advance.
Suggested-by: Minchan Kim <minchan@kernel.org>
Link: http://lkml.kernel.org/r/1467970510-21195-27-git-send-email-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@surriel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vmscan.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff -puN mm/vmscan.c~mm-vmscan-avoid-passing-in-remaining-unnecessarily-to-prepare_kswapd_sleep mm/vmscan.c
--- a/mm/vmscan.c~mm-vmscan-avoid-passing-in-remaining-unnecessarily-to-prepare_kswapd_sleep
+++ a/mm/vmscan.c
@@ -3021,15 +3021,10 @@ static bool zone_balanced(struct zone *z
*
* Returns true if kswapd is ready to sleep
*/
-static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, long remaining,
- int classzone_idx)
+static bool prepare_kswapd_sleep(pg_data_t *pgdat, int order, int classzone_idx)
{
int i;
- /* If a direct reclaimer woke kswapd within HZ/10, it's premature */
- if (remaining)
- return false;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-28 22:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 22:46 [patch 043/101] mm, vmscan: avoid passing in `remaining' unnecessarily to prepare_kswapd_sleep() akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.