Commit 0815adc2 authored by Thomas Spatzier's avatar Thomas Spatzier Committed by Linus Torvalds

[PATCH] s390: qeth performance.

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.
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 618310db
...@@ -181,6 +181,15 @@ config QDIO_PERF_STATS ...@@ -181,6 +181,15 @@ config QDIO_PERF_STATS
If unsure, say N. 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" comment "Misc"
config PREEMPT config PREEMPT
......
...@@ -70,6 +70,7 @@ CONFIG_MATHEMU=y ...@@ -70,6 +70,7 @@ CONFIG_MATHEMU=y
CONFIG_MACHCHK_WARNING=y CONFIG_MACHCHK_WARNING=y
CONFIG_QDIO=y CONFIG_QDIO=y
# CONFIG_QDIO_PERF_STATS is not set # CONFIG_QDIO_PERF_STATS is not set
# CONFIG_QDIO_DEBUG is not set
# #
# Misc # Misc
......
This diff is collapsed.
#ifndef _CIO_QDIO_H #ifndef _CIO_QDIO_H
#define _CIO_QDIO_H #define _CIO_QDIO_H
#define VERSION_CIO_QDIO_H "$Revision: 1.24 $" #define VERSION_CIO_QDIO_H "$Revision: 1.26 $"
//#define QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#ifdef QDIO_DBF_LIKE_HELL
#define QDIO_VERBOSE_LEVEL 9 #define QDIO_VERBOSE_LEVEL 9
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_VERBOSE_LEVEL 5 #define QDIO_VERBOSE_LEVEL 5
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_USE_PROCESSING_STATE #define QDIO_USE_PROCESSING_STATE
...@@ -103,75 +101,75 @@ enum qdio_irq_states { ...@@ -103,75 +101,75 @@ enum qdio_irq_states {
#define QDIO_DBF_HEX0(ex,name,addr,len) QDIO_DBF_HEX(ex,name,0,addr,len) #define QDIO_DBF_HEX0(ex,name,addr,len) QDIO_DBF_HEX(ex,name,0,addr,len)
#define QDIO_DBF_HEX1(ex,name,addr,len) QDIO_DBF_HEX(ex,name,1,addr,len) #define QDIO_DBF_HEX1(ex,name,addr,len) QDIO_DBF_HEX(ex,name,1,addr,len)
#define QDIO_DBF_HEX2(ex,name,addr,len) QDIO_DBF_HEX(ex,name,2,addr,len) #define QDIO_DBF_HEX2(ex,name,addr,len) QDIO_DBF_HEX(ex,name,2,addr,len)
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_DBF_HEX3(ex,name,addr,len) QDIO_DBF_HEX(ex,name,3,addr,len) #define QDIO_DBF_HEX3(ex,name,addr,len) QDIO_DBF_HEX(ex,name,3,addr,len)
#define QDIO_DBF_HEX4(ex,name,addr,len) QDIO_DBF_HEX(ex,name,4,addr,len) #define QDIO_DBF_HEX4(ex,name,addr,len) QDIO_DBF_HEX(ex,name,4,addr,len)
#define QDIO_DBF_HEX5(ex,name,addr,len) QDIO_DBF_HEX(ex,name,5,addr,len) #define QDIO_DBF_HEX5(ex,name,addr,len) QDIO_DBF_HEX(ex,name,5,addr,len)
#define QDIO_DBF_HEX6(ex,name,addr,len) QDIO_DBF_HEX(ex,name,6,addr,len) #define QDIO_DBF_HEX6(ex,name,addr,len) QDIO_DBF_HEX(ex,name,6,addr,len)
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_HEX3(ex,name,addr,len) do {} while (0) #define QDIO_DBF_HEX3(ex,name,addr,len) do {} while (0)
#define QDIO_DBF_HEX4(ex,name,addr,len) do {} while (0) #define QDIO_DBF_HEX4(ex,name,addr,len) do {} while (0)
#define QDIO_DBF_HEX5(ex,name,addr,len) do {} while (0) #define QDIO_DBF_HEX5(ex,name,addr,len) do {} while (0)
#define QDIO_DBF_HEX6(ex,name,addr,len) do {} while (0) #define QDIO_DBF_HEX6(ex,name,addr,len) do {} while (0)
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_TEXT0(ex,name,text) QDIO_DBF_TEXT(ex,name,0,text) #define QDIO_DBF_TEXT0(ex,name,text) QDIO_DBF_TEXT(ex,name,0,text)
#define QDIO_DBF_TEXT1(ex,name,text) QDIO_DBF_TEXT(ex,name,1,text) #define QDIO_DBF_TEXT1(ex,name,text) QDIO_DBF_TEXT(ex,name,1,text)
#define QDIO_DBF_TEXT2(ex,name,text) QDIO_DBF_TEXT(ex,name,2,text) #define QDIO_DBF_TEXT2(ex,name,text) QDIO_DBF_TEXT(ex,name,2,text)
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_DBF_TEXT3(ex,name,text) QDIO_DBF_TEXT(ex,name,3,text) #define QDIO_DBF_TEXT3(ex,name,text) QDIO_DBF_TEXT(ex,name,3,text)
#define QDIO_DBF_TEXT4(ex,name,text) QDIO_DBF_TEXT(ex,name,4,text) #define QDIO_DBF_TEXT4(ex,name,text) QDIO_DBF_TEXT(ex,name,4,text)
#define QDIO_DBF_TEXT5(ex,name,text) QDIO_DBF_TEXT(ex,name,5,text) #define QDIO_DBF_TEXT5(ex,name,text) QDIO_DBF_TEXT(ex,name,5,text)
#define QDIO_DBF_TEXT6(ex,name,text) QDIO_DBF_TEXT(ex,name,6,text) #define QDIO_DBF_TEXT6(ex,name,text) QDIO_DBF_TEXT(ex,name,6,text)
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_TEXT3(ex,name,text) do {} while (0) #define QDIO_DBF_TEXT3(ex,name,text) do {} while (0)
#define QDIO_DBF_TEXT4(ex,name,text) do {} while (0) #define QDIO_DBF_TEXT4(ex,name,text) do {} while (0)
#define QDIO_DBF_TEXT5(ex,name,text) do {} while (0) #define QDIO_DBF_TEXT5(ex,name,text) do {} while (0)
#define QDIO_DBF_TEXT6(ex,name,text) do {} while (0) #define QDIO_DBF_TEXT6(ex,name,text) do {} while (0)
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_SETUP_NAME "qdio_setup" #define QDIO_DBF_SETUP_NAME "qdio_setup"
#define QDIO_DBF_SETUP_LEN 8 #define QDIO_DBF_SETUP_LEN 8
#define QDIO_DBF_SETUP_INDEX 2 #define QDIO_DBF_SETUP_INDEX 2
#define QDIO_DBF_SETUP_NR_AREAS 1 #define QDIO_DBF_SETUP_NR_AREAS 1
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_DBF_SETUP_LEVEL 6 #define QDIO_DBF_SETUP_LEVEL 6
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_SETUP_LEVEL 2 #define QDIO_DBF_SETUP_LEVEL 2
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_SBAL_NAME "qdio_labs" /* sbal */ #define QDIO_DBF_SBAL_NAME "qdio_labs" /* sbal */
#define QDIO_DBF_SBAL_LEN 256 #define QDIO_DBF_SBAL_LEN 256
#define QDIO_DBF_SBAL_INDEX 2 #define QDIO_DBF_SBAL_INDEX 2
#define QDIO_DBF_SBAL_NR_AREAS 2 #define QDIO_DBF_SBAL_NR_AREAS 2
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_DBF_SBAL_LEVEL 6 #define QDIO_DBF_SBAL_LEVEL 6
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_SBAL_LEVEL 2 #define QDIO_DBF_SBAL_LEVEL 2
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_TRACE_NAME "qdio_trace" #define QDIO_DBF_TRACE_NAME "qdio_trace"
#define QDIO_DBF_TRACE_LEN 8 #define QDIO_DBF_TRACE_LEN 8
#define QDIO_DBF_TRACE_NR_AREAS 2 #define QDIO_DBF_TRACE_NR_AREAS 2
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_DBF_TRACE_INDEX 4 #define QDIO_DBF_TRACE_INDEX 4
#define QDIO_DBF_TRACE_LEVEL 4 /* -------- could be even more verbose here */ #define QDIO_DBF_TRACE_LEVEL 4 /* -------- could be even more verbose here */
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_TRACE_INDEX 2 #define QDIO_DBF_TRACE_INDEX 2
#define QDIO_DBF_TRACE_LEVEL 2 #define QDIO_DBF_TRACE_LEVEL 2
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_SENSE_NAME "qdio_sense" #define QDIO_DBF_SENSE_NAME "qdio_sense"
#define QDIO_DBF_SENSE_LEN 64 #define QDIO_DBF_SENSE_LEN 64
#define QDIO_DBF_SENSE_INDEX 1 #define QDIO_DBF_SENSE_INDEX 1
#define QDIO_DBF_SENSE_NR_AREAS 1 #define QDIO_DBF_SENSE_NR_AREAS 1
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_DBF_SENSE_LEVEL 6 #define QDIO_DBF_SENSE_LEVEL 6
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define QDIO_DBF_SENSE_LEVEL 2 #define QDIO_DBF_SENSE_LEVEL 2
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define QDIO_TRACE_QTYPE QDIO_ZFCP_QFMT #define QDIO_TRACE_QTYPE QDIO_ZFCP_QFMT
#define QDIO_DBF_SLSB_OUT_NAME "qdio_slsb_out" #define QDIO_DBF_SLSB_OUT_NAME "qdio_slsb_out"
...@@ -185,7 +183,7 @@ enum qdio_irq_states { ...@@ -185,7 +183,7 @@ enum qdio_irq_states {
#define QDIO_DBF_SLSB_IN_INDEX 8 #define QDIO_DBF_SLSB_IN_INDEX 8
#define QDIO_DBF_SLSB_IN_NR_AREAS 1 #define QDIO_DBF_SLSB_IN_NR_AREAS 1
#define QDIO_DBF_SLSB_IN_LEVEL 6 #define QDIO_DBF_SLSB_IN_LEVEL 6
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
#define QDIO_PRINTK_HEADER QDIO_NAME ": " #define QDIO_PRINTK_HEADER QDIO_NAME ": "
...@@ -494,7 +492,7 @@ struct qdio_perf_stats { ...@@ -494,7 +492,7 @@ struct qdio_perf_stats {
#define QDIO_GET_ADDR(x) ((__u32)(long)x) #define QDIO_GET_ADDR(x) ((__u32)(long)x)
#endif /* CONFIG_ARCH_S390X */ #endif /* CONFIG_ARCH_S390X */
#ifdef QDIO_DBF_LIKE_HELL #ifdef CONFIG_QDIO_DEBUG
#define set_slsb(x,y) \ #define set_slsb(x,y) \
if(q->queue_type==QDIO_TRACE_QTYPE) { \ if(q->queue_type==QDIO_TRACE_QTYPE) { \
if(q->is_input_q) { \ if(q->is_input_q) { \
...@@ -511,9 +509,9 @@ struct qdio_perf_stats { ...@@ -511,9 +509,9 @@ struct qdio_perf_stats {
QDIO_DBF_HEX2(0,slsb_out,&q->slsb,QDIO_MAX_BUFFERS_PER_Q); \ QDIO_DBF_HEX2(0,slsb_out,&q->slsb,QDIO_MAX_BUFFERS_PER_Q); \
} \ } \
} }
#else /* QDIO_DBF_LIKE_HELL */ #else /* CONFIG_QDIO_DEBUG */
#define set_slsb(x,y) qdio_set_slsb(x,y) #define set_slsb(x,y) qdio_set_slsb(x,y)
#endif /* QDIO_DBF_LIKE_HELL */ #endif /* CONFIG_QDIO_DEBUG */
struct qdio_q { struct qdio_q {
volatile struct slsb slsb; volatile struct slsb slsb;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "qeth_mpc.h" #include "qeth_mpc.h"
#define VERSION_QETH_H "$Revision: 1.111 $" #define VERSION_QETH_H "$Revision: 1.113 $"
#ifdef CONFIG_QETH_IPV6 #ifdef CONFIG_QETH_IPV6
#define QETH_VERSION_IPV6 ":IPv6" #define QETH_VERSION_IPV6 ":IPv6"
...@@ -150,6 +150,8 @@ qeth_hex_dump(unsigned char *buf, size_t len) ...@@ -150,6 +150,8 @@ qeth_hex_dump(unsigned char *buf, size_t len)
#define SENSE_RESETTING_EVENT_BYTE 1 #define SENSE_RESETTING_EVENT_BYTE 1
#define SENSE_RESETTING_EVENT_FLAG 0x80 #define SENSE_RESETTING_EVENT_FLAG 0x80
#define atomic_swap(a,b) xchg((int *)a.counter, b)
/* /*
* Common IO related definitions * Common IO related definitions
*/ */
...@@ -425,12 +427,18 @@ struct qeth_qdio_out_buffer { ...@@ -425,12 +427,18 @@ struct qeth_qdio_out_buffer {
struct qeth_card; 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 qeth_qdio_out_q {
struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q]; struct qdio_buffer qdio_bufs[QDIO_MAX_BUFFERS_PER_Q];
struct qeth_qdio_out_buffer bufs[QDIO_MAX_BUFFERS_PER_Q]; struct qeth_qdio_out_buffer bufs[QDIO_MAX_BUFFERS_PER_Q];
int queue_no; int queue_no;
struct qeth_card *card; struct qeth_card *card;
spinlock_t lock; atomic_t state;
volatile int do_pack; volatile int do_pack;
/* /*
* index of buffer to be filled by driver; state EMPTY or PACKING * index of buffer to be filled by driver; state EMPTY or PACKING
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment