From: Tejun Heo <htejun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Mark Mason <mason@postdiluvian.org>,
linux-ide@vger.kernel.org, jgarzik@pobox.com,
Jens Axboe <jens.axboe@oracle.com>
Subject: [PATCH] scsi: align shost->hostdata to cacheline
Date: Thu, 14 Feb 2008 18:48:01 +0900 [thread overview]
Message-ID: <47B40E51.3060002@gmail.com> (raw)
In-Reply-To: <47B3AFDC.5040605@gmail.com>
shost->hostdata can contain arbitrary data including DMA target
buffers. Align it to cacheline.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
James, what do you think?
include/scsi/scsi_host.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 5c58d59..3876d24 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -663,12 +663,10 @@ struct Scsi_Host {
void *shost_data;
/*
- * We should ensure that this is aligned, both for better performance
- * and also because some compilers (m68k) don't automatically force
- * alignment to a long boundary.
+ * Used for storage of host specific stuff. As it may contain
+ * arbitrary data, align it to cacheline.
*/
- unsigned long hostdata[0] /* Used for storage of host specific stuff */
- __attribute__ ((aligned (sizeof(unsigned long))));
+ unsigned long hostdata[0] ____cacheline_aligned;
};
#define class_to_shost(d) \
next prev parent reply other threads:[~2008-02-14 9:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 18:02 libata/sata_sil24 cache alignment problem? Mark Mason
2008-02-12 22:12 ` Alan Cox
2008-02-12 23:36 ` James Bottomley
2008-02-13 2:13 ` Alan Cox
2008-02-13 2:32 ` James Bottomley
2008-02-13 18:47 ` Mark Mason
2008-02-13 20:21 ` Alan Cox
2008-02-13 21:25 ` Mark Mason
2008-02-14 0:21 ` Alan Cox
2008-02-14 3:05 ` Tejun Heo
2008-02-14 9:44 ` [PATCH] libata: align ap->sector_buf to cacheline Tejun Heo
2008-02-14 9:48 ` Tejun Heo [this message]
2008-02-14 15:05 ` [PATCH] scsi: align shost->hostdata " James Bottomley
2008-02-14 22:49 ` Tejun Heo
2008-02-15 18:57 ` James Bottomley
2008-02-21 2:32 ` Tejun Heo
2008-02-13 18:51 ` libata/sata_sil24 cache alignment problem? Mark Mason
2008-02-12 23:25 ` Thomas Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47B40E51.3060002@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jens.axboe@oracle.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=mason@postdiluvian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.