linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: remove 8 bytes of padding from struct writeback_control on 64 bit builds
@ 2012-04-25 13:53 Richard Kennedy
  2012-04-25 13:57 ` Fengguang Wu
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kennedy @ 2012-04-25 13:53 UTC (permalink / raw)
  To: Wu Fengguang; +Cc: lkml, linux-fsdevel, Jan Kara

Reorder structure writeback_control to remove 8 bytes of padding on 64
bit builds, this shrinks its size from 48 to 40 bytes.

This structure is always on the stack and uses C99 named initialisation,
so should be safe and have a small impact on stack usage.
    
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

--

patch against v3.4-rc4
compiled and tested on x86_64

I've been running my desktop with this patch applied for several days
and have not seen any problems.
regards
Richard





diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index a2b84f5..3309736 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -58,7 +58,6 @@ extern const char *wb_reason_name[];
  * in a manner such that unspecified fields are set to zero.
  */
 struct writeback_control {
-	enum writeback_sync_modes sync_mode;
 	long nr_to_write;		/* Write this many pages, and decrement
 					   this for each page written */
 	long pages_skipped;		/* Pages which were not written */
@@ -71,6 +70,8 @@ struct writeback_control {
 	loff_t range_start;
 	loff_t range_end;
 
+	enum writeback_sync_modes sync_mode;
+
 	unsigned for_kupdate:1;		/* A kupdate writeback */
 	unsigned for_background:1;	/* A background writeback */
 	unsigned tagged_writepages:1;	/* tag-and-write to avoid livelock */

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

end of thread, other threads:[~2012-04-25 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-25 13:53 [PATCH] fs: remove 8 bytes of padding from struct writeback_control on 64 bit builds Richard Kennedy
2012-04-25 13:57 ` Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).