lkml.org 
[lkml]   [2008]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH] Disable ioat channel only on platforms where ile driver can load
Date
> ---------- Original message ----------
> From: Venki Pallipadi <venkatesh.pallipadi@intel.com>
> Date: Oct 23, 2008 12:34 AM
> Subject: [PATCH] Disable ioat channel only on platforms where ile
> driver can load
> To: Andi Kleen <ak@linux.intel.com>
> Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>, Len Brown
> <lenb@kernel.org>, Ingo Molnar <mingo@elte.hu>,
> "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, Linux
> Kernel Mailing List <linux-kernel@vger.kernel.org>, "Henroid, Andrew
> D" <andrew.d.henroid@intel.com>, Linus Torvalds
> <torvalds@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>,
> "H. Peter Anvin" <hpa@zytor.com>
>
>
> On Wed, Oct 22, 2008 at 12:19:22AM -0700, Andi Kleen wrote:
>> Pallipadi, Venkatesh wrote:
>>>
>>>>> +#if CONFIG_I7300_IDLE_IOAT_CHANNEL
>>>>> + device->common.chancnt--;
>>>>> +#endif
>>>> I still think this lone decrement looks fishy. Can there please be
>>>> some explanation how it exactly relates to the i7300 idle driver,
>>>> where the matching increment is, etc.?
>>>
>>> No. This is not a increment/decrement thing. It is basically
>>> telling other Users of IOAT that they have one IOAT channel less
>>> that they can use.
>>> The last IOAT channel is used by i7300 idle driver to get the
>>> throttling to work.
>>
>> Ok then it should be made conditional on the i7300 actually be
>> available
>> in the system? It looks like you do it always no matter what
>> chipset is in there.
>
> Does the patch below look OK?
>
> Thanks,
> Venki
>
> Based on input from Andi Kleen:
> share the platform detection code with ioat_dma and disable the
> channel in
> dma engine only for specific platforms.
>
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
> ---

Hi Venki,

Why for your purposes don't you use dmaengine to request an ioatdma
channel from ioatdma driver?
This way sharing of this channel with other clients
(like TCP which uses ioatdma for receive offloading) would be possible .
In the previous approach your change was not acceptable from ioatdma
perspective
(for IOAT_VER_3_0 there are 8 ioat devices, each with single channel
- in this case you would take away all 8 channels and make ioat ver.3.0
totally disfunctional).
Even with this approach (assuming that it would affect IOAT_VER_1_2
only)
you reserve one channel of four statically for your purposes only,
leaving for TCP receive offloading 75% of ioatdma resources and thus
affecting its efficiency.

Dan, what do you think?

BTW, could you please next time in case of ioat/dmaengine changes
include Dan and me in the list?

Thanks,
Maciej


> Index: linux-acpi-2.6/drivers/dma/ioat_dma.c
> ===================================================================
> --- linux-acpi-2.6.orig/drivers/dma/ioat_dma.c 2008-10-22
> 11:42:04.000000000 -0700
> +++ linux-acpi-2.6/drivers/dma/ioat_dma.c 2008-10-22
> 11:42:46.000000000 -0700
> @@ -33,6 +33,7 @@
> #include <linux/delay.h>
> #include <linux/dma-mapping.h>
> #include <linux/workqueue.h>
> +#include <linux/i7300_idle.h>
> #include "ioatdma.h"
> #include "ioatdma_registers.h"
> #include "ioatdma_hw.h"
> @@ -172,7 +173,9 @@ static int ioat_dma_enumerate_channels(s
> xfercap = (xfercap_scale == 0 ? -1 : (1UL << xfercap_scale));
>
> #if CONFIG_I7300_IDLE_IOAT_CHANNEL
> - device->common.chancnt--;
> + if (i7300_idle_platform_probe(NULL, NULL) == 0) {
> + device->common.chancnt--;
> + }
> #endif
> for (i = 0; i < device->common.chancnt; i++) {
> ioat_chan = kzalloc(sizeof(*ioat_chan), GFP_KERNEL);



\
 
 \ /
  Last update: 2008-10-28 17:32    [from the cache]
©2003-2011 Jasper Spaans