All of lore.kernel.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Michael Schmitz <schmitzmic@gmail.com>,
	Ondrej Zary <linux@rainbow-software.org>,
	<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 06/12] scsi/ncr5380: Improve hostdata struct member alignment and cache-ability
Date: Thu,  6 Oct 2016 19:41:07 -0400 (EDT)	[thread overview]
Message-ID: <3840d58bd05d509ea8d6ae6a1be00957d1b84e74.1475791899.git.fthain@telegraphics.com.au> (raw)
In-Reply-To: <cover.1475791899.git.fthain@telegraphics.com.au>

Re-order struct members so that hot data lies at the beginning of the
struct and cold data at the end. Improve the comments while we're here.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/NCR5380.h | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index f0eea44..ceafa0c 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -219,27 +219,27 @@
 #define FLAG_TOSHIBA_DELAY		128	/* Allow for borken CD-ROMs */
 
 struct NCR5380_hostdata {
-	NCR5380_implementation_fields;		/* implementation specific */
-	struct Scsi_Host *host;			/* Host backpointer */
-	unsigned char id_mask, id_higher_mask;	/* 1 << id, all bits greater */
-	unsigned char busy[8];			/* index = target, bit = lun */
-	int dma_len;				/* requested length of DMA */
-	unsigned char last_message;		/* last message OUT */
-	struct scsi_cmnd *connected;		/* currently connected cmnd */
-	struct scsi_cmnd *selecting;		/* cmnd to be connected */
-	struct list_head unissued;		/* waiting to be issued */
-	struct list_head autosense;		/* priority issue queue */
-	struct list_head disconnected;		/* waiting for reconnect */
-	spinlock_t lock;			/* protects this struct */
-	int flags;
-	struct scsi_eh_save ses;
-	struct scsi_cmnd *sensing;
+	NCR5380_implementation_fields;		/* Board-specific data */
+	unsigned long poll_loops;		/* Register polling limit */
+	spinlock_t lock;			/* Protects this struct */
+	struct scsi_cmnd *connected;		/* Currently connected cmnd */
+	struct list_head disconnected;		/* Waiting for reconnect */
+	struct Scsi_Host *host;			/* SCSI host backpointer */
+	struct workqueue_struct *work_q;	/* SCSI host work queue */
+	struct work_struct main_task;		/* Work item for main loop */
+	int flags;				/* Board-specific quirks */
+	int dma_len;				/* Requested length of DMA */
+	int read_overruns;	/* Transfer size reduction for DMA erratum */
+	struct list_head unissued;		/* Waiting to be issued */
+	struct scsi_cmnd *selecting;		/* Cmnd to be connected */
+	struct list_head autosense;		/* Priority cmnd queue */
+	struct scsi_cmnd *sensing;		/* Cmnd needing autosense */
+	struct scsi_eh_save ses;		/* Cmnd state saved for EH */
+	unsigned char busy[8];			/* Index = target, bit = lun */
+	unsigned char id_mask;			/* 1 << Host ID */
+	unsigned char id_higher_mask;		/* All bits above id_mask */
+	unsigned char last_message;		/* Last Message Out */
 	char info[256];
-	int read_overruns;                /* number of bytes to cut from a
-	                                   * transfer to handle chip overruns */
-	struct work_struct main_task;
-	struct workqueue_struct *work_q;
-	unsigned long poll_loops;		/* register polling limit */
 };
 
 #ifdef __KERNEL__
-- 
2.7.3

WARNING: multiple messages have this Message-ID (diff)
From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Michael Schmitz <schmitzmic@gmail.com>,
	Ondrej Zary <linux@rainbow-software.org>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 06/12] scsi/ncr5380: Improve hostdata struct member alignment and cache-ability
Date: Thu,  6 Oct 2016 19:41:07 -0400 (EDT)	[thread overview]
Message-ID: <3840d58bd05d509ea8d6ae6a1be00957d1b84e74.1475791899.git.fthain@telegraphics.com.au> (raw)
In-Reply-To: <cover.1475791899.git.fthain@telegraphics.com.au>

Re-order struct members so that hot data lies at the beginning of the
struct and cold data at the end. Improve the comments while we're here.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/NCR5380.h | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index f0eea44..ceafa0c 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -219,27 +219,27 @@
 #define FLAG_TOSHIBA_DELAY		128	/* Allow for borken CD-ROMs */
 
 struct NCR5380_hostdata {
-	NCR5380_implementation_fields;		/* implementation specific */
-	struct Scsi_Host *host;			/* Host backpointer */
-	unsigned char id_mask, id_higher_mask;	/* 1 << id, all bits greater */
-	unsigned char busy[8];			/* index = target, bit = lun */
-	int dma_len;				/* requested length of DMA */
-	unsigned char last_message;		/* last message OUT */
-	struct scsi_cmnd *connected;		/* currently connected cmnd */
-	struct scsi_cmnd *selecting;		/* cmnd to be connected */
-	struct list_head unissued;		/* waiting to be issued */
-	struct list_head autosense;		/* priority issue queue */
-	struct list_head disconnected;		/* waiting for reconnect */
-	spinlock_t lock;			/* protects this struct */
-	int flags;
-	struct scsi_eh_save ses;
-	struct scsi_cmnd *sensing;
+	NCR5380_implementation_fields;		/* Board-specific data */
+	unsigned long poll_loops;		/* Register polling limit */
+	spinlock_t lock;			/* Protects this struct */
+	struct scsi_cmnd *connected;		/* Currently connected cmnd */
+	struct list_head disconnected;		/* Waiting for reconnect */
+	struct Scsi_Host *host;			/* SCSI host backpointer */
+	struct workqueue_struct *work_q;	/* SCSI host work queue */
+	struct work_struct main_task;		/* Work item for main loop */
+	int flags;				/* Board-specific quirks */
+	int dma_len;				/* Requested length of DMA */
+	int read_overruns;	/* Transfer size reduction for DMA erratum */
+	struct list_head unissued;		/* Waiting to be issued */
+	struct scsi_cmnd *selecting;		/* Cmnd to be connected */
+	struct list_head autosense;		/* Priority cmnd queue */
+	struct scsi_cmnd *sensing;		/* Cmnd needing autosense */
+	struct scsi_eh_save ses;		/* Cmnd state saved for EH */
+	unsigned char busy[8];			/* Index = target, bit = lun */
+	unsigned char id_mask;			/* 1 << Host ID */
+	unsigned char id_higher_mask;		/* All bits above id_mask */
+	unsigned char last_message;		/* Last Message Out */
 	char info[256];
-	int read_overruns;                /* number of bytes to cut from a
-	                                   * transfer to handle chip overruns */
-	struct work_struct main_task;
-	struct workqueue_struct *work_q;
-	unsigned long poll_loops;		/* register polling limit */
 };
 
 #ifdef __KERNEL__
-- 
2.7.3

  parent reply	other threads:[~2016-10-06 23:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 23:41 [PATCH v2 00/12] Fixes, cleanup and g_NCR5380_mmio/g_NCR5380 merger Finn Thain
2016-10-06 23:41 ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 03/12] scsi/atari_scsi: Make device register accessors re-enterant Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 11/12] scsi/ncr5380: Use correct types for DMA routines Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` Finn Thain [this message]
2016-10-06 23:41   ` [PATCH v2 06/12] scsi/ncr5380: Improve hostdata struct member alignment and cache-ability Finn Thain
2016-10-06 23:41 ` [PATCH v2 05/12] scsi/ncr5380: Increase register polling limit Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 07/12] scsi/ncr5380: Store IO ports and addresses in host private data Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 09/12] scsi/ncr5380: Pass hostdata pointer to register polling routines Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 04/12] scsi/ncr5380: Simplify register polling limit Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 01/12] scsi/g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio drivers Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 02/12] scsi/cumana_1: Remove unused cumanascsi_setup() function Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 12/12] scsi/ncr5380: Suppress unhelpful "interrupt without IRQ bit" message Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 10/12] scsi/ncr5380: Expedite register polling Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41 ` [PATCH v2 08/12] scsi/ncr5380: Use correct types for device register accessors Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-06 23:41   ` Finn Thain
2016-10-07 17:59 ` [PATCH v2 00/12] Fixes, cleanup and g_NCR5380_mmio/g_NCR5380 merger Ondrej Zary
2016-10-09  7:22 ` Michael Schmitz

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=3840d58bd05d509ea8d6ae6a1be00957d1b84e74.1475791899.git.fthain@telegraphics.com.au \
    --to=fthain@telegraphics.com.au \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=martin.petersen@oracle.com \
    --cc=schmitzmic@gmail.com \
    /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.