Re: [PATCH] crypto, qat, use generic numa functions

2014-10-08 Thread Prarit Bhargava


On 10/08/2014 11:50 AM, Tadeusz Struk wrote:
> Hi Prarit,
> On 10/07/2014 05:12 PM, Prarit Bhargava wrote:
>> The method in which the qat code determines the numa node for memory
>> allocations is a bit clunky.  On 2 socket, single node systems it is
>> possible that adf_get_dev_node_id() returns node 1, even though node 1
>> doesn't exist.
>>
>> This code transitions the qat code to the generic numa functions.
>> Changing adf_get_dev_node_id() to a simple call to dev_get_node() results
>> in a change to the adf_accel_dev struct as well.
> 
> The problem with that is we don't want to use any valid numa node, but
> the node we are connected to or we don't want to use the accelerator at
> all. Otherwise, when the first valid numa node happens to be the remote
> node the dma transactions we be slow and instead of accelerating we will
> slow things down.
> A patch that enforces this is on it's way.

Yeah, I was actually wondering if

dev_get_node() returns NO_NODE, then we should just default to 0?

I'll wait for your patch ...

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


Re: [PATCH] crypto, qat, use generic numa functions

2014-10-08 Thread Tadeusz Struk
Hi Prarit,
On 10/07/2014 05:12 PM, Prarit Bhargava wrote:
> The method in which the qat code determines the numa node for memory
> allocations is a bit clunky.  On 2 socket, single node systems it is
> possible that adf_get_dev_node_id() returns node 1, even though node 1
> doesn't exist.
> 
> This code transitions the qat code to the generic numa functions.
> Changing adf_get_dev_node_id() to a simple call to dev_get_node() results
> in a change to the adf_accel_dev struct as well.

The problem with that is we don't want to use any valid numa node, but
the node we are connected to or we don't want to use the accelerator at
all. Otherwise, when the first valid numa node happens to be the remote
node the dma transactions we be slow and instead of accelerating we will
slow things down.
A patch that enforces this is on it's way.

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


Re: [PATCH] crypto, qat, use generic numa functions

2014-10-08 Thread Tadeusz Struk
Hi Prarit,
On 10/07/2014 05:12 PM, Prarit Bhargava wrote:
 The method in which the qat code determines the numa node for memory
 allocations is a bit clunky.  On 2 socket, single node systems it is
 possible that adf_get_dev_node_id() returns node 1, even though node 1
 doesn't exist.
 
 This code transitions the qat code to the generic numa functions.
 Changing adf_get_dev_node_id() to a simple call to dev_get_node() results
 in a change to the adf_accel_dev struct as well.

The problem with that is we don't want to use any valid numa node, but
the node we are connected to or we don't want to use the accelerator at
all. Otherwise, when the first valid numa node happens to be the remote
node the dma transactions we be slow and instead of accelerating we will
slow things down.
A patch that enforces this is on it's way.

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


Re: [PATCH] crypto, qat, use generic numa functions

2014-10-08 Thread Prarit Bhargava


On 10/08/2014 11:50 AM, Tadeusz Struk wrote:
 Hi Prarit,
 On 10/07/2014 05:12 PM, Prarit Bhargava wrote:
 The method in which the qat code determines the numa node for memory
 allocations is a bit clunky.  On 2 socket, single node systems it is
 possible that adf_get_dev_node_id() returns node 1, even though node 1
 doesn't exist.

 This code transitions the qat code to the generic numa functions.
 Changing adf_get_dev_node_id() to a simple call to dev_get_node() results
 in a change to the adf_accel_dev struct as well.
 
 The problem with that is we don't want to use any valid numa node, but
 the node we are connected to or we don't want to use the accelerator at
 all. Otherwise, when the first valid numa node happens to be the remote
 node the dma transactions we be slow and instead of accelerating we will
 slow things down.
 A patch that enforces this is on it's way.

Yeah, I was actually wondering if

dev_get_node() returns NO_NODE, then we should just default to 0?

I'll wait for your patch ...

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