vmscan: zone_reclaim don't call disable_swap_token()
Subsystems (3)
PATCH 1/1 vmscan: zone_reclaim don't call disable_swap_token()
Swap token don't works when zone reclaim is enabled since it was born. Because __zone_reclaim() always call disable_swap_token() unconditionally.
This kill swap token feature completely. As far as I know, nobody want to that. Remove it.
--- mm/vmscan.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
mm/vmscan.c +0 -1
@@ -2590,7 +2590,6 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) };unsigned long slab_reclaimable; -disable_swap_token ();cond_resched ();/* * We need to be able to allocate from the reserves for RECLAIM_SWAP
Signature · 9 lines
1.6.5.2 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines · KOSAKI Motohiro
Swap token don't works when zone reclaim is enabled since it was born. Because
__zone_reclaim()always calldisable_swap_token()unconditionally.This kill swap token feature completely. As far as I know, nobody want to that. Remove it.
Cc Rik van Riel<[email protected]>Cc Christoph Lameter<[email protected]>Signed-off-by KOSAKI Motohiro<[email protected]>
You are absolutely right.
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · KOSAKI Motohiro
Swap token don't works when zone reclaim is enabled since it was born. Because
__zone_reclaim()always calldisable_swap_token()unconditionally.This kill swap token feature completely. As far as I know, nobody want to that. Remove it.
In f7b7fd8f3ebbb, Rik added disable_swap_token.
At that time, sc.priority in zone_reclaim is zero so it does make sense. But in a92f71263a, Christoph changed the priority to begin from ZONE_RECLAIM_PRIORITY with remained disable_swap_token. It doesn't make sense.
So doesn't we add disable_swap_token following as than removing?
mm/vmscan.c +0 -0
@@ -2590,7 +2590,6 @@ static int __zone_reclaim(struct zone *zone,
gfp_t gfp_mask, unsigned int order)
};
unsigned long slab_reclaimable;- disable_swap_token();
cond_resched();
/*
* We need to be able to allocate from the reserves for RECLAIM_SWAP
@@ -2612,6 +2611,8 @@ static int __zone_reclaim(struct zone *zone,
gfp_t gfp_mask, unsigned int order)
note_zone_scanning_priority(zone, priority);
shrink_zone(priority, zone, &sc);
priority--;
+ if (!priority)
+ disable_swap_token();
} while (priority >= 0 && sc.nr_reclaimed < nr_pages);
}Signature · 8 lines
Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 10 lines
Quoted 7 lines · KOSAKI Motohiro
Swap token don't works when zone reclaim is enabled since it was born. Because
__zone_reclaim()always calldisable_swap_token()unconditionally.This kill swap token feature completely. As far as I know, nobody want to that. Remove it.
Quoted 7 lines
In
f7b7fd8f3ebbb, Rik addeddisable_swap_token.
At that time, sc.priority inzone_reclaimis zero so it does make sense. But ina92f71263a, Christoph changed the priority to begin fromZONE_RECLAIM_PRIORITYwith remaineddisable_swap_token. It doesn't make sense.So doesn't we add
disable_swap_tokenfollowing as than removing?
f7b7fd8f3ebbb says disable_swap_token was introduced to prevent OOM. but zone reclaim failure don't make OOM. instead, fallback to try_to_free_pages().
If the system have really heavy pressure, do_try_to_free_pages() will call disable_swap_token().
So, What benefit is there?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Minchan Kim
Reviewed-byQuoted 16 lines · KOSAKI Motohiro
Quoted 16 lines
Quoted 7 lines · KOSAKI Motohiro
Swap token don't works when zone reclaim is enabled since it was born. Because
__zone_reclaim()always calldisable_swap_token()unconditionally.This kill swap token feature completely. As far as I know, nobody want to that. Remove it.
In
f7b7fd8f3ebbb, Rik addeddisable_swap_token.
At that time, sc.priority inzone_reclaimis zero so it does make sense. But ina92f71263a, Christoph changed the priority to begin fromZONE_RECLAIM_PRIORITYwith remaineddisable_swap_token. It doesn't make sense.
Quoted 4 lines
Quoted 1 line
So doesn't we add
disable_swap_tokenfollowing as than removing?
f7b7fd8f3ebbbsaysdisable_swap_tokenwas introduced to prevent OOM. but zone reclaim failure don't make OOM. instead, fallback totry_to_free_pages().
Indeed. I missed that.
Thanks, Kosaki.
Signature · 8 lines
Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>