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:	Thu, 05 May 2011 16:50:04 +0100
From:	Richard Kennedy <richard@....demon.co.uk>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Dipankar Sarma <dipankar@...ibm.com>
Subject: [PATCH] RCU: remove alignment padding from rcu_data on 64 bit
 builds

Reorder rcu_data to remove 8 bytes of alignment padding on 64 bit builds
so saving a total of 16 bytes per cpu, (rcu_sched_data & rcu_bh_data).
    
When CONFIG_NO_HZ is set, it shrinks the size of this structure from 264
to 256 bytes allowing it to fit into one fewer cache lines.

Signed-off-by: Richard Kennedy <richard@....demon.co.uk>
---

patch against v2.6.39-rc6
compiled & tested on x86_64

I've been running with this patch for some weeks and have not seen any
issues.

regards
Richard



diff --git a/kernel/rcutree.h b/kernel/rcutree.h
index e8f057e..fcced0f 100644
--- a/kernel/rcutree.h
+++ b/kernel/rcutree.h
@@ -176,6 +176,9 @@ struct rcu_data {
 	bool		qs_pending;	/* Core waits for quiesc state. */
 	bool		beenonline;	/* CPU online at least once. */
 	bool		preemptable;	/* Preemptable RCU? */
+
+	int cpu;
+
 	struct rcu_node *mynode;	/* This CPU's leaf of hierarchy */
 	unsigned long grpmask;		/* Mask to apply to leaf qsmask. */
 
@@ -238,8 +241,6 @@ struct rcu_data {
 	unsigned long n_rp_gp_started;
 	unsigned long n_rp_need_fqs;
 	unsigned long n_rp_need_nothing;
-
-	int cpu;
 };
 
 /* Values for signaled field in struct rcu_state. */


--
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