aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJan Glauber <jang@linux.vnet.ibm.com>2010-02-26 16:37:37 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-02-26 16:37:31 -0500
commit432ac5e04b931df8376e0858d4bf0fd41436a271 (patch)
treef8901ab07b0076f6614887fb8fe63e8b7c2cae45 /drivers
parentd307297f73077b4dc8110eb998108ffc467e8e6c (diff)
[S390] qdio: optimize cache line usage of struct qdio_irq
Remove a memset hack that relied on the internal layout of the qdio_irq struct and move the per device statistics data into an own cache line to avoid cache line bashing between the inbound and the outbound queue tasklets. Also reduce the number of allocated queues from 32 to 4 which is the current maximum. That saves a cache line in struct qdio_irq. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/cio/qdio.h9
-rw-r--r--drivers/s390/cio/qdio_setup.c10
2 files changed, 12 insertions, 7 deletions
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h
index 9a5283e16e38..48aa0647432b 100644
--- a/drivers/s390/cio/qdio.h
+++ b/drivers/s390/cio/qdio.h
@@ -208,7 +208,7 @@ struct qdio_dev_perf_stat {
208 unsigned int eqbs_partial; 208 unsigned int eqbs_partial;
209 unsigned int sqbs; 209 unsigned int sqbs;
210 unsigned int sqbs_partial; 210 unsigned int sqbs_partial;
211}; 211} ____cacheline_aligned;
212 212
213struct qdio_queue_perf_stat { 213struct qdio_queue_perf_stat {
214 /* 214 /*
@@ -329,12 +329,8 @@ struct qdio_irq {
329 struct qdio_ssqd_desc ssqd_desc; 329 struct qdio_ssqd_desc ssqd_desc;
330 void (*orig_handler) (struct ccw_device *, unsigned long, struct irb *); 330 void (*orig_handler) (struct ccw_device *, unsigned long, struct irb *);
331 331
332 struct qdio_dev_perf_stat perf_stat;
333 int perf_stat_enabled; 332 int perf_stat_enabled;
334 /* 333
335 * Warning: Leave these members together at the end so they won't be
336 * cleared in qdio_setup_irq.
337 */
338 struct qdr *qdr; 334 struct qdr *qdr;
339 unsigned long chsc_page; 335 unsigned long chsc_page;
340 336
@@ -343,6 +339,7 @@ struct qdio_irq {
343 339
344 debug_info_t *debug_area; 340 debug_info_t *debug_area;
345 struct mutex setup_mutex; 341 struct mutex setup_mutex;
342 struct qdio_dev_perf_stat perf_stat;
346}; 343};
347 344
348/* helper functions */ 345/* helper functions */
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c
index 4464907715a4..7f4a75465140 100644
--- a/drivers/s390/cio/qdio_setup.c
+++ b/drivers/s390/cio/qdio_setup.c
@@ -382,7 +382,15 @@ int qdio_setup_irq(struct qdio_initialize *init_data)
382 struct qdio_irq *irq_ptr = init_data->cdev->private->qdio_data; 382 struct qdio_irq *irq_ptr = init_data->cdev->private->qdio_data;
383 int rc; 383 int rc;
384 384
385 memset(irq_ptr, 0, ((char *)&irq_ptr->qdr) - ((char *)irq_ptr)); 385 memset(&irq_ptr->qib, 0, sizeof(irq_ptr->qib));
386 memset(&irq_ptr->siga_flag, 0, sizeof(irq_ptr->siga_flag));
387 memset(&irq_ptr->ccw, 0, sizeof(irq_ptr->ccw));
388 memset(&irq_ptr->ssqd_desc, 0, sizeof(irq_ptr->ssqd_desc));
389 memset(&irq_ptr->perf_stat, 0, sizeof(irq_ptr->perf_stat));
390
391 irq_ptr->debugfs_dev = irq_ptr->debugfs_perf = NULL;
392 irq_ptr->sch_token = irq_ptr->state = irq_ptr->perf_stat_enabled = 0;
393
386 /* wipes qib.ac, required by ar7063 */ 394 /* wipes qib.ac, required by ar7063 */
387 memset(irq_ptr->qdr, 0, sizeof(struct qdr)); 395 memset(irq_ptr->qdr, 0, sizeof(struct qdr));
388 396