[PATCH] irqchip: gicv3-its: Use NUMA aware memory allocation for ITS tables

Shanker Donthineni shankerd at codeaurora.org
Mon Jul 3 11:25:25 PDT 2017


Hi Ganapatrao,

On 07/03/2017 11:51 AM, Ganapatrao Kulkarni wrote:
> On Mon, Jul 3, 2017 at 7:07 PM, Shanker Donthineni
> <shankerd at codeaurora.org> wrote:
>> Hi Ganapatraoo,
>>
>> On 06/29/2017 10:01 PM, Ganapatrao Kulkarni wrote:
>>> On Fri, Jun 30, 2017 at 8:04 AM, Ganapatrao Kulkarni
>>> <gpkulkarni at gmail.com> wrote:
>>>> Hi Shanker,
>>>>
>>>> On Sun, Jun 25, 2017 at 9:16 PM, Shanker Donthineni
>>>> <shankerd at codeaurora.org> wrote:
>>>>> The NUMA node information is visible to ITS driver but not being used
>>>>> other than handling errata. This patch allocates the memory for ITS
>>>>> tables from the corresponding NUMA node using the appropriate NUMA
>>>>> aware functions.
>>>
>>> IMHO, the description would have been more constructive?
>>>
>>> "All ITS tables are mapped by default to NODE 0 memory.
>>> Adding changes to allocate memory from respective NUMA NODES of ITS devices.
>>> This will optimize tables access and avoids unnecessary inter-node traffic."
>>>
>>
>> I don't understand why you are saying 'All ITS tables are mapped by default to NODE 0 memory'? Kernel runtime memory allocation comes from the corresponding NUMA node of the CPU that being called.
> 
> IIRC, ITT tables can be on any cpu, if drivers are not built-in and
> msi-x vectors are not initialised in init/probe, etc
> however Device table and Collection table are allocated from node 0
> memory during ITS driver init by boot-cpu/cpu0.
> 

Don't confuse boot-cpu aka logical cpu0 and NUMA node 0, these is no requirement that 
says boot cpu has to tied to NUMA node 0. The memory for first level device table, 
prop and collection tables are allocated from the boot cpu's NUMA node not NUMA node 0.

All other memory allocation inside the ITS driver can be done from any NUMA node depends 
on which CPU calls the memory allocation functions during runtime. 

-- 
Shanker Donthineni
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.



More information about the linux-arm-kernel mailing list