Skip to contentSkip to conversation

s390: qeth performance.

PATCH In review Martin Schwidefsky 2 participants 3 messages Aug 5, 2004 – Aug 6, 2004 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: qeth performance.

[PATCH] s390: qeth performance.

From: Thomas Spatzier <[email protected]>

qeth network driver performance improvements. The ping time on the HiperSockets interface drops from 250 usecs to 50 usecs and the 1 bytes request/response test improves from 70000 to 110000 transactions.

diffstat:

 arch/s390/Kconfig            |    9 ++
 arch/s390/defconfig          |    1 
 drivers/s390/cio/qdio.c      |   69 +++++++++++++---
 drivers/s390/cio/qdio.h      |   56 ++++++-------
 drivers/s390/net/qeth.h      |   12 ++
 drivers/s390/net/qeth_main.c |  183 +++++++++++++++++++++++++++++--------------
 6 files changed, 230 insertions(+), 100 deletions(-)
arch/s390/Kconfig +9 -0
diff -urN linux-2.6/arch/s390/Kconfig linux-2.6-s390/arch/s390/Kconfig
@@ -181,6 +181,15 @@
 
 	  If unsure, say N.
 
+config QDIO_DEBUG
+	bool "Extended debugging information"
+	depends on QDIO
+	help
+	  Say Y here to get extended debugging output in /proc/s390dbf/qdio...
+	  Warning: this option reduces the performance of the QDIO module.
+
+	  If unsure, say N.
+
 comment "Misc"
 
 config PREEMPT
arch/s390/defconfig +1 -0
diff -urN linux-2.6/arch/s390/defconfig linux-2.6-s390/arch/s390/defconfig
@@ -70,6 +70,7 @@
 CONFIG_MACHCHK_WARNING=y
 CONFIG_QDIO=y
 # CONFIG_QDIO_PERF_STATS is not set
+# CONFIG_QDIO_DEBUG is not set
 
 #
 # Misc
drivers/s390/cio/qdio.c +57 -12

310 lines not on this page · raw message

drivers/s390/cio/qdio.h +27 -29

140 lines not on this page · raw message

drivers/s390/net/qeth.h +10 -2
diff -urN linux-2.6/drivers/s390/net/qeth.h linux-2.6-s390/drivers/s390/net/qeth.h
@@ -23,7 +23,7 @@
 
 #include "qeth_mpc.h"
 
-#define VERSION_QETH_H 		"$Revision: 1.111 $"
+#define VERSION_QETH_H 		"$Revision: 1.113 $"
 
 #ifdef CONFIG_QETH_IPV6
 #define QETH_VERSION_IPV6 	":IPv6"
@@ -150,6 +150,8 @@
 #define SENSE_RESETTING_EVENT_BYTE 1
 #define SENSE_RESETTING_EVENT_FLAG 0x80
 
+#define atomic_swap(a,b) xchg((int *)a.counter, b)
+
 /*
  * Common IO related definitions
  */
@@ -425,12 +427,18 @@
 
 struct qeth_card;
 
+enum qeth_out_q_states {
+       QETH_OUT_Q_UNLOCKED,
+       QETH_OUT_Q_LOCKED,
+       QETH_OUT_Q_LOCKED_FLUSH,
+};
+
 struct qeth_qdio_out_q {
 	struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q];
 	struct qeth_qdio_out_buffer bufs[QDIO_MAX_BUFFERS_PER_Q];
 	int queue_no;
 	struct qeth_card *card;
-	spinlock_t lock;
+	atomic_t state;
 	volatile int do_pack;
 	/*
 	 * index of buffer to be filled by driver; state EMPTY or PACKING
drivers/s390/net/qeth_main.c +126 -57

337 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Martin Schwidefsky

qeth network driver performance improvements. The ping time on the HiperSockets interface drops from 250 usecs to 50 usecs and the 1 bytes request/response test improves from 70000 to 110000 transactions.

Looks good.

Quoted 30 lines
(quoted diff) +19 -0
+config QDIO_DEBUG
+	bool "Extended debugging information"
+	depends on QDIO
+	help
+	  Say Y here to get extended debugging output in /proc/s390dbf/qdio...
+	  Warning: this option reduces the performance of the QDIO module.
+
+	  If unsure, say N.
+
 comment "Misc"
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG

Review

Quoted 10 lines
(quoted diff) +5 -0
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG
 
+#ifdef CONFIG_QDIO_DEBUG

After 50% of the patch I grew tired of it. Martin, since when do you like excessive use of #ifdef?

Jörn

Signature · 2 lines
And spam is a useful source of entropy for /dev/random too!
-- Jasmine Strong
#3 lore raw
In reply to a message not in the archive
Quoted 6 lines · Martin Schwidefsky

Jörn Engel <[email protected]> wrote on 06/08/2004 02:49:41 PM:

Quoted 3 lines

After 50% of the patch I grew tired of it. Martin, since when do you like excessive use of #ifdef?

Well, it isn't so bad. Only 35 #ifdef CONFIG_QDIO_DEBUG.

Maybe our definitions of "isn't so bad" don't match. ;) Anyway, it's a first step. No new code was added, the old debugging mess is explicitly marked as such now. Next step would be to either completely get rid of it or replace it with something less ugly.

Jörn

Signature · 3 lines
Beware of bugs in the above code; I have only proved it correct, but
not tried it.
-- Donald Knuth