public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kobject: reorder kobject to save space on 64 bit builds
@ 2008-06-02 10:07 Richard Kennedy
  2008-06-02 10:28 ` richard kennedy
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kennedy @ 2008-06-02 10:07 UTC (permalink / raw)
  To: gregkh; +Cc: lkml

reorder kobject to save space on 64 bit builds.
shrinks from 76 to 64 bytes & moves allocated kobject to a smaller
slab. 
    
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
----

Running successfully on 2.6.26-rc2 on my desktop AMD64.




diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 39e709f..07124fc 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -59,12 +59,12 @@ enum kobject_action {
 
 struct kobject {
 	const char		*name;
-	struct kref		kref;
 	struct list_head	entry;
 	struct kobject		*parent;
 	struct kset		*kset;
 	struct kobj_type	*ktype;
 	struct sysfs_dirent	*sd;
+	struct kref		kref;
 	unsigned int state_initialized:1;
 	unsigned int state_in_sysfs:1;
 	unsigned int state_add_uevent_sent:1;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kobject: reorder kobject to save space on 64 bit builds
  2008-06-02 10:07 [PATCH] kobject: reorder kobject to save space on 64 bit builds Richard Kennedy
@ 2008-06-02 10:28 ` richard kennedy
  0 siblings, 0 replies; 2+ messages in thread
From: richard kennedy @ 2008-06-02 10:28 UTC (permalink / raw)
  To: gregkh; +Cc: lkml

Richard Kennedy wrote:
> reorder kobject to save space on 64 bit builds.
> shrinks from 76 to 64 bytes & moves allocated kobject to a smaller
> slab. 

That size change should be 72 -> 64!

Sorry
Richard


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-02 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-02 10:07 [PATCH] kobject: reorder kobject to save space on 64 bit builds Richard Kennedy
2008-06-02 10:28 ` richard kennedy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox