Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423005 > unrolled thread
| Started by | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| First post | 2016-06-15 15:20 +0200 |
| Last post | 2016-06-16 09:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 05/27] mm, vmscan: Have kswapd only scan based on the highest requested zone Vlastimil Babka <vbabka@suse.cz> - 2016-06-15 15:20 +0200
Re: [PATCH 05/27] mm, vmscan: Have kswapd only scan based on the highest requested zone Mel Gorman <mgorman@techsingularity.net> - 2016-06-16 09:50 +0200
| From | Vlastimil Babka <vbabka@suse.cz> |
|---|---|
| Date | 2016-06-15 15:20 +0200 |
| Subject | Re: [PATCH 05/27] mm, vmscan: Have kswapd only scan based on the highest requested zone |
| Message-ID | <rKiTE-31v-19@gated-at.bofh.it> |
On 06/09/2016 08:04 PM, Mel Gorman wrote:
> kswapd checks all eligible zones to see if they need balancing even if it was
> woken for a lower zone. This made sense when we reclaimed on a per-zone basis
> because we wanted to shrink zones fairly so avoid age-inversion problems.
Now we reclaim a single lru, but still will skip over pages from the
higher zones than reclaim_idx, so this is not much different from
per-zone basis wrt age-inversion?
> Ideally this is completely unnecessary when reclaiming on a per-node basis.
> In theory, there may still be anomalies when all requests are for lower
> zones and very old pages are preserved in higher zones but this should be
> the exceptional case.
>
> Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
I don't see the argument, but agree it should be exceptional in any
case, and if there's such a case, it's better to focus on pages from the
zone(s) where a pending (potentially atomic) allocation is restricted
to. Or rather, this is the only way we can focus reclaim on such pages
now that there's a single lru list.
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/vmscan.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index ab1b28e7e20a..0a619241c576 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -3171,11 +3171,8 @@ static int balance_pgdat(pg_data_t *pgdat, int order, int classzone_idx)
>
> sc.nr_reclaimed = 0;
>
> - /*
> - * Scan in the highmem->dma direction for the highest
> - * zone which needs scanning
> - */
> - for (i = pgdat->nr_zones - 1; i >= 0; i--) {
> + /* Scan from the highest requested zone to dma */
> + for (i = classzone_idx; i >= 0; i--) {
> struct zone *zone = pgdat->node_zones + i;
>
> if (!populated_zone(zone))
>
[toc] | [next] | [standalone]
| From | Mel Gorman <mgorman@techsingularity.net> |
|---|---|
| Date | 2016-06-16 09:50 +0200 |
| Message-ID | <rKAdQ-5rx-7@gated-at.bofh.it> |
| In reply to | #1423005 |
On Wed, Jun 15, 2016 at 03:13:13PM +0200, Vlastimil Babka wrote: > On 06/09/2016 08:04 PM, Mel Gorman wrote: > >kswapd checks all eligible zones to see if they need balancing even if it was > >woken for a lower zone. This made sense when we reclaimed on a per-zone basis > >because we wanted to shrink zones fairly so avoid age-inversion problems. > > Now we reclaim a single lru, but still will skip over pages from the higher > zones than reclaim_idx, so this is not much different from per-zone basis > wrt age-inversion? > Yes, but it only applies in the case where the allocation request is zone restricted. Previously, even with fair zone allocation policy, we had problems with a high zone with recently allocated pages being reclaimed simply because the low watermark was reached. Think of bugs in the past where the normal zone was a small percentage of memory. -- Mel Gorman SUSE Labs
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web