Re: [PATCH 2/2] I/OAT: tcp_dma_copybreak default value dependant on I/OAT version

From: Dan Williams
Date: Fri Jul 11 2008 - 15:23:18 EST


On Fri, Jul 11, 2008 at 4:37 AM, Maciej Sosnowski
<maciej.sosnowski@xxxxxxxxx> wrote:
> 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.
>
> Signed-off-by: Maciej Sosnowski <maciej.sosnowski@xxxxxxxxx>
> ---
>
> drivers/dma/dmaengine.c | 3 +++
> drivers/dma/ioat_dma.c | 15 +++++++++++++++
> include/linux/dmaengine.h | 2 ++
> 3 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
> index 97b329e..d57365a 100644
> --- a/drivers/dma/dmaengine.c
> +++ b/drivers/dma/dmaengine.c
> @@ -70,6 +70,7 @@ #include <linux/percpu.h>
> #include <linux/rcupdate.h>
> #include <linux/mutex.h>
> #include <linux/jiffies.h>
> +#include <net/tcp.h>
>
> static DEFINE_MUTEX(dma_list_mutex);
> static LIST_HEAD(dma_device_list);
> @@ -402,6 +403,8 @@ int dma_async_device_register(struct dma
> list_add_tail(&device->global_node, &dma_device_list);
> mutex_unlock(&dma_list_mutex);
>
> + sysctl_tcp_dma_copybreak = device->tcp_dma_copybreak;
> +

Hi Maciej,

When NET_DMA is not enabled this breaks the build. Also, given that
NET_DMA is only beneficial on architectures with i/o coherent caches
this fix up should be done directly in the driver, not passed up to
the common core.

Regards,
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/