lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  3 May 2012 15:40:42 +0900
From:	Minchan Kim <>
To:	Greg Kroah-Hartman <>,
	Seth Jennings <>,
	Nitin Gupta <>,
	Dan Magenheimer <>,
	Andrew Morton <>
	Minchan Kim <>
Subject: [PATCH 4/4] zsmalloc: zsmalloc: align cache line size

It's a overkill to align pool size with PAGE_SIZE to avoid
false-sharing. This patch aligns it with just cache line size.

Signed-off-by: Minchan Kim <>
 drivers/staging/zsmalloc/zsmalloc-main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c
index 51074fa..3991b03 100644
--- a/drivers/staging/zsmalloc/zsmalloc-main.c
+++ b/drivers/staging/zsmalloc/zsmalloc-main.c
@@ -489,14 +489,14 @@ fail:
 struct zs_pool *zs_create_pool(const char *name, gfp_t flags)
-	int i, error, ovhd_size;
+	int i, error;
 	struct zs_pool *pool;
 	if (!name)
 		return NULL;
-	ovhd_size = roundup(sizeof(*pool), PAGE_SIZE);
-	pool = kzalloc(ovhd_size, GFP_KERNEL);
+	pool = kzalloc(ALIGN(sizeof(*pool), cache_line_size()),
 	if (!pool)
 		return NULL;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists