lists.openwall.net   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  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Aug 2007 10:58:24 -0700
From:	"Siddha, Suresh B" <suresh.b.siddha@...el.com>
To:	clameter@....com
Cc:	lethal@...ux-sh.org, penberg@...helsinki.fi,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: [patch] slab: revert "slab: fix alien cache handling"

Christoph,

Can we revert git commit 3cdc0ed0cea50ea08dd146c1bbc82b1bcc2e1b80 ?
This is introducing a performance regression and nullifies the previous
commit.

commit 62918a036148230ba1ad175dc8a0952e3752ac57
Author: Siddha, Suresh B <suresh.b.siddha@...el.com>
Date:   Wed May 2 19:27:18 2007 +0200

    [PATCH] x86-64: skip cache_free_alien() on non NUMA
    
    Set use_alien_caches to 0 on non NUMA platforms.  And avoid calling the
    cache_free_alien() when use_alien_caches is not set.  This will avoid the
    cache miss that happens while dereferencing slabp to get nodeid.

Looking at the 3cdc0ed0cea50ea08dd146c1bbc82b1bcc2e1b80 changelog, I can't find
enough info of why cache_free_alien() must be called regardless if we use alien
caches or not.

Appended patch fixes the performance regression. Please  comment the need
for 3cdc0ed0cea50ea08dd146c1bbc82b1bcc2e1b80, if I miss something.

thanks,
suresh
---

Skip calling cache_free_alien() when alien caches are not used.
This will avoid cache misses that happen while accessing slabp (which
is per page memory  reference) to get nodeid. Instead use a global
variable to skip the call, which is mostly likely to be present in the
cache.

This gives a 0.8% performance boost with the database oltp workload
on a quad-core SMP platform and by any means the number is not small :)

Signed-off-by: Suresh Siddha <suresh.b.siddha@...el.com>
---

diff --git a/mm/slab.c b/mm/slab.c
index a684778..d6e2251 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3558,7 +3558,14 @@ static inline void __cache_free(struct kmem_cache *cachep, void *objp)
 	check_irq_off();
 	objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0));
 
-	if (cache_free_alien(cachep, objp))
+	/*
+	 * Skip calling cache_free_alien() when alien caches are not used.
+	 * This will avoid cache misses that happen while accessing slabp (which
+	 * is per page memory  reference) to get nodeid. Instead use a global
+	 * variable to skip the call, which is mostly likely to be present in the
+	 * cache.
+	 */
+	if (use_alien_caches && cache_free_alien(cachep, objp))
 		return;
 
 	if (likely(ac->avail < ac->limit)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ