Thread (6 messages) flat view 6 messages, 2 authors, 2020-07-03
STALE2273d

Revision v2 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]

[PATCH v2 3/3] mm/zswap: allocate acomp on the numa node committing acomp_req

From: Barry Song <hidden>
Date: 2020-06-23 04:18:23
Also in: linux-mm, lkml
Subsystem: memory management, the rest, zswap compressed swap caching · Maintainers: Andrew Morton, Linus Torvalds, Johannes Weiner, Yosry Ahmed, Nhat Pham

zswap is allocating acomp on one different cpu with those cpus which will
eventually committing acomp_req. this patch specifies the numa node to
help compression/decompression done by local (de)compressors hardware.

Cc: Seth Jennings <redacted>
Cc: Dan Streetman <redacted>
Cc: Vitaly Wool <redacted>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller" <davem@davemloft.net>
Signed-off-by: Barry Song <redacted>
---
 -v2: patch is rebased againest "[PATCH] mm/zswap: careful error path
 implementation in comp_prepare" [1]
 [1] https://lkml.org/lkml/2020/6/22/347

 mm/zswap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zswap.c b/mm/zswap.c
index c0a85ef46610..98db09524af6 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -438,7 +438,7 @@ static int zswap_cpu_comp_prepare(unsigned int cpu, struct hlist_node *node)
 		pr_err("Could not allocate acomp_ctx\n");
 		return -ENOMEM;
 	}
-	acomp = crypto_alloc_acomp(pool->tfm_name, 0, 0);
+	acomp = crypto_alloc_acomp_node(pool->tfm_name, 0, 0, cpu_to_node(cpu));
 	if (IS_ERR(acomp)) {
 		pr_err("could not alloc crypto acomp %s : %ld\n",
 				pool->tfm_name, PTR_ERR(acomp));
-- 
2.27.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help