All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds
@ 2010-09-10 11:19 Richard Kennedy
       [not found] ` <4C8A3F1E.8050400@gmail.com>
  2010-09-17  6:13 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Kennedy @ 2010-09-10 11:19 UTC (permalink / raw)
  To: jgarzik; +Cc: Tejun Heo, lkml, linux-ide

Reorder structure ata_queued_cmd to remove 8 bytes of alignment padding
on 64 bit builds & therefore reduce the size of structure ata_port by
256 bytes.
    
Overall this will have little impact, other than reducing the amount of
memory that is cleared when allocating ata_ports.
    
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
----
patch against 2.6.36-rc3
compiled & tested on x86_64

I've been running this patch for a couple of weeks with no apparent
issues.

regards
Richard



diff --git a/include/linux/libata.h b/include/linux/libata.h
index f010f18..e115380 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -559,13 +559,13 @@ struct ata_queued_cmd {
 	unsigned int		extrabytes;
 	unsigned int		curbytes;
 
-	struct scatterlist	*cursg;
-	unsigned int		cursg_ofs;
-
 	struct scatterlist	sgent;
 
 	struct scatterlist	*sg;
 
+	struct scatterlist	*cursg;
+	unsigned int		cursg_ofs;
+
 	unsigned int		err_mask;
 	struct ata_taskfile	result_tf;
 	ata_qc_cb_t		complete_fn;

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

end of thread, other threads:[~2010-09-17  6:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 11:19 [PATCH] libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds Richard Kennedy
     [not found] ` <4C8A3F1E.8050400@gmail.com>
2010-09-12 11:21   ` Richard Kennedy
2010-09-17  6:13 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.