Skip to contentSkip to conversation

libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds

PATCH Applied Richard Kennedy 2 participants 3 messages Sep 10, 2010 – Sep 17, 2010 1 message not in the archive libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds

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.

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

include/linux/libata.h +3 -3
index f010f18..e115380 100644
@@ -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;

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · Hugo Antunes

Greetings,

Following the list this pasts days, building a big machine with 45 sata2 disks (WD green 1.5TB), Sil3124 4 ports sata2 with 9 port multipliers with 5 each also from Silicom image.

This machine should smoke but it doesn't, attached is the dmesg dump where it is possible to see the enourmous ammount
of hard and soft resets.Using Ubuntu/server 10.4 2.6.32-25-server x86_64, been questioning if this patch could
make me have better numbers from this system, going to build a debian/ubuntu kernel image with the patch, if anyone has a link for a deb image with this patch..apreciated.

Quoted 4 lines

Keep the good work

Regards,
./hantunes

Hi,
I think it's very unlikely that my patch will have any impact on your problem, it is only a very minor improvement when creating new ports.

I didn't get the dmesg attachment so I can't tell what sort of problems you are having, but with that many drives I'd start by checking the power supplies & cables and then try the latest kernel.

regards
Richard

Applied
#3 lore raw
In reply to Richard Kennedy
Quoted 8 lines · Richard Kennedy

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.

Quoted 8 lines

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

applied