vmscan-per-node-deferred-work.patch removed from -mm tree
Subsystems (4)
[email protected]
maintainerSubject: [to-be-updated] vmscan-per-node-deferred-work.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 06 Jun 2013 12:34:45 -0700
The patch titled
Subject: vmscan: per-node deferred work
has been removed from the -mm tree. Its filename was
vmscan-per-node-deferred-work.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
From: Glauber Costa <[email protected]>
Subject: vmscan: per-node deferred work
We already keep per-node LRU lists for objects being shrunk, but the work that is deferred from one run to another is kept global. This creates an impedance problem, where upon node pressure, work deferred will accumulate and end up being flushed in other nodes.
In large machines, many nodes can accumulate at the same time, all adding to the global counter. As we accumulate more and more, we start to ask for the caches to flush even bigger numbers. The result is that the caches are depleted and do not stabilize. To achieve stable steady state behavior, we need to tackle it differently.
In this patch we keep the deferred count per-node, and will never accumulate that to other nodes.
---
include/linux/shrinker.h | 30 ++++ mm/vmscan.c | 247 ++++++++++++++++++++++--------------- 2 files changed, 176 insertions(+), 101 deletions(-)
include/linux/shrinker.h renamed from include/linux/shrinker.h~vmscan-per-node-deferred-work +28 -2
@@ -19,6 +19,8 @@ struct shrink_control {/* shrink from these nodes */ nodemask_t nodes_to_scan; +/* current node being shrunk (for NUMA aware shrinkers) */ +int nid; };/*
@@ -42,6 +44,8 @@ struct shrink_control {* objects freed during the scan, or -1 if progress cannot be made due to * potential deadlocks. If -1 is returned, then no further attempts to call the * @scan_objects will be made from the current reclaim context. +* +* @flags determine the shrinker abilities, like numa awareness */ struct shrinker {int (*shrink)(struct shrinker *,struct shrink_control *sc);
@@ -50,12 +54,34 @@ struct shrinker {int seeks;/* seeks to recreate an obj */ long batch;/* reclaim batch size, 0 = default */ +unsigned long flags;/* These are for internal use */ struct list_head list; - atomic_long_t nr_in_batch; /* objs pending delete */ +/* +* We would like to avoid allocating memory when registering a new +* shrinker. All shrinkers will need to keep track of deferred objects, +* and we need a counter for this. If the shrinkers are not NUMA aware, +* this is a small and bounded space that fits into an atomic_long_t. +* This is because that the deferring decisions are global, and we will +* not allocate in this case. +* +* When the shrinker is NUMA aware, we will need this to be a per-node +* array. Numerically speaking, the minority of shrinkers are NUMA +* aware, so this saves quite a bit. +*/ +union { +/* objs pending delete */ +atomic_long_t nr_deferred; +/* objs pending delete, per node */ +atomic_long_t *nr_deferred_node; + }; };#define DEFAULT_SEEKS 2/* A good number if you don't know better. */ -extern void register_shrinker (struct shrinker *); + +/* Flags */ +#define SHRINKER_NUMA_AWARE (1 << 0) + +extern int register_shrinker (struct shrinker *);extern void unregister_shrinker (struct shrinker *);#endif
mm/vmscan.c renamed from mm/vmscan.c~vmscan-per-node-deferred-work +148 -99
275 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
list_lru-per-node-api.patch fs-convert-inode-and-dentry-shrinking-to-be-node-aware.patch xfs-convert-buftarg-lru-to-generic-code.patch xfs-rework-buffer-dispose-list-tracking.patch xfs-convert-dquot-cache-lru-to-list_lru.patch fs-convert-fs-shrinkers-to-new-scan-count-api.patch drivers-convert-shrinkers-to-new-count-scan-api.patch i915-bail-out-earlier-when-shrinker-cannot-acquire-mutex.patch shrinker-convert-remaining-shrinkers-to-count-scan-api.patch hugepage-convert-huge-zero-page-shrinker-to-new-shrinker-api.patch shrinker-kill-old-shrink-api.patch vmscan-also-shrink-slab-in-memcg-pressure.patch memcglist_lru-duplicate-lrus-upon-kmemcg-creation.patch lru-add-an-element-to-a-memcg-list.patch list_lru-per-memcg-walks.patch memcg-per-memcg-kmem-shrinking.patch memcg-scan-cache-objects-hierarchically.patch vmscan-take-at-least-one-pass-with-shrinkers.patch super-targeted-memcg-reclaim.patch memcg-move-initialization-to-memcg-creation.patch vmpressure-in-kernel-notifications.patch memcg-reap-dead-memcgs-upon-global-memory-pressure.patch