* [PATCH] mm: vmscan: do not clear SHRINKER_NUMA_AWARE if nr_node_ids == 1
@ 2016-01-27 16:47 Vladimir Davydov
2016-01-27 18:52 ` Johannes Weiner
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Davydov @ 2016-01-27 16:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: Johannes Weiner, linux-mm, linux-kernel
Currently, on shrinker registration we clear SHRINKER_NUMA_AWARE if
there's the only NUMA node present. The comment states that this will
allow us to save some small loop time later. It used to be true when
this code was added (see commit 1d3d4437eae1b ("vmscan: per-node
deferred work")), but since commit 6b4f7799c6a57 ("mm: vmscan: invoke
slab shrinkers from shrink_zone()") it doesn't make any difference.
Anyway, running on non-NUMA machine shouldn't make a shrinker NUMA
unaware, so zap this hunk.
Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
---
mm/vmscan.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 30e0cd7a0ceb..153fea2fc5e3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -228,14 +228,6 @@ int register_shrinker(struct shrinker *shrinker)
{
size_t size = sizeof(*shrinker->nr_deferred);
- /*
- * If we only have one possible node in the system anyway, save
- * ourselves the trouble and disable NUMA aware behavior. This way we
- * will save memory and some small loop time later.
- */
- if (nr_node_ids == 1)
- shrinker->flags &= ~SHRINKER_NUMA_AWARE;
-
if (shrinker->flags & SHRINKER_NUMA_AWARE)
size *= nr_node_ids;
--
2.1.4
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: vmscan: do not clear SHRINKER_NUMA_AWARE if nr_node_ids == 1
2016-01-27 16:47 [PATCH] mm: vmscan: do not clear SHRINKER_NUMA_AWARE if nr_node_ids == 1 Vladimir Davydov
@ 2016-01-27 18:52 ` Johannes Weiner
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Weiner @ 2016-01-27 18:52 UTC (permalink / raw)
To: Vladimir Davydov; +Cc: Andrew Morton, linux-mm, linux-kernel
On Wed, Jan 27, 2016 at 07:47:22PM +0300, Vladimir Davydov wrote:
> Currently, on shrinker registration we clear SHRINKER_NUMA_AWARE if
> there's the only NUMA node present. The comment states that this will
> allow us to save some small loop time later. It used to be true when
> this code was added (see commit 1d3d4437eae1b ("vmscan: per-node
> deferred work")), but since commit 6b4f7799c6a57 ("mm: vmscan: invoke
> slab shrinkers from shrink_zone()") it doesn't make any difference.
> Anyway, running on non-NUMA machine shouldn't make a shrinker NUMA
> unaware, so zap this hunk.
>
> Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-27 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-27 16:47 [PATCH] mm: vmscan: do not clear SHRINKER_NUMA_AWARE if nr_node_ids == 1 Vladimir Davydov
2016-01-27 18:52 ` Johannes Weiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox