diff options
author | Maciej Sosnowski <maciej.sosnowski@intel.com> | 2008-07-22 20:30:57 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-07-22 20:30:57 -0400 |
commit | 16a37acaaf4aaa631ba3f83710ed6cdb1a597520 (patch) | |
tree | 5826c763c70dc6b798c0d12216a80f4596dec284 /drivers/dma | |
parent | 09177e85d6a0bffac8b55afd28ed8b82bd873f0b (diff) |
I/OAT: tcp_dma_copybreak default value dependent on I/OAT version
I/OAT DMA performance tuning showed different optimal values of
tcp_dma_copybreak for different I/OAT versions (4096 for 1.2 and 2048
for 2.0). This patch lets ioatdma driver set tcp_dma_copybreak value
according to these results.
[dan.j.williams@intel.com: remove some ifdefs]
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ioat_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/ioatdma.h | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/dma/ioat_dma.c b/drivers/dma/ioat_dma.c index da572968a7db..ece5a0e3a335 100644 --- a/drivers/dma/ioat_dma.c +++ b/drivers/dma/ioat_dma.c | |||
@@ -1581,6 +1581,8 @@ struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, | |||
1581 | if (err) | 1581 | if (err) |
1582 | goto err_self_test; | 1582 | goto err_self_test; |
1583 | 1583 | ||
1584 | ioat_set_tcp_copy_break(device); | ||
1585 | |||
1584 | dma_async_device_register(&device->common); | 1586 | dma_async_device_register(&device->common); |
1585 | 1587 | ||
1586 | INIT_DELAYED_WORK(&device->work, ioat_dma_chan_watchdog); | 1588 | INIT_DELAYED_WORK(&device->work, ioat_dma_chan_watchdog); |
diff --git a/drivers/dma/ioatdma.h b/drivers/dma/ioatdma.h index c6ec933f9895..685adb62aa5a 100644 --- a/drivers/dma/ioatdma.h +++ b/drivers/dma/ioatdma.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/dmapool.h> | 27 | #include <linux/dmapool.h> |
28 | #include <linux/cache.h> | 28 | #include <linux/cache.h> |
29 | #include <linux/pci_ids.h> | 29 | #include <linux/pci_ids.h> |
30 | #include <net/tcp.h> | ||
30 | 31 | ||
31 | #define IOAT_DMA_VERSION "2.18" | 32 | #define IOAT_DMA_VERSION "2.18" |
32 | 33 | ||
@@ -129,6 +130,20 @@ struct ioat_desc_sw { | |||
129 | struct dma_async_tx_descriptor async_tx; | 130 | struct dma_async_tx_descriptor async_tx; |
130 | }; | 131 | }; |
131 | 132 | ||
133 | static inline void ioat_set_tcp_copy_break(struct ioatdma_device *dev) | ||
134 | { | ||
135 | #ifdef CONFIG_NET_DMA | ||
136 | switch (dev->version) { | ||
137 | case IOAT_VER_1_2: | ||
138 | sysctl_tcp_dma_copybreak = 4096; | ||
139 | break; | ||
140 | case IOAT_VER_2_0: | ||
141 | sysctl_tcp_dma_copybreak = 2048; | ||
142 | break; | ||
143 | } | ||
144 | #endif | ||
145 | } | ||
146 | |||
132 | #if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE) | 147 | #if defined(CONFIG_INTEL_IOATDMA) || defined(CONFIG_INTEL_IOATDMA_MODULE) |
133 | struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, | 148 | struct ioatdma_device *ioat_dma_probe(struct pci_dev *pdev, |
134 | void __iomem *iobase); | 149 | void __iomem *iobase); |