Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
On 5/17/2018 4:41 PM, Matthew Wilcox wrote: > Let's try a different example. I have a four-socket system with one > NVMe device with lots of hardware queues. Each CPU has its own queue > assigned to it. If I allocate all the PRP metadata on the socket with > the NVMe device attached to it, I'm

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
On 5/17/2018 4:41 PM, Matthew Wilcox wrote: > Let's try a different example. I have a four-socket system with one > NVMe device with lots of hardware queues. Each CPU has its own queue > assigned to it. If I allocate all the PRP metadata on the socket with > the NVMe device attached to it, I'm

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Matthew Wilcox
On Thu, May 17, 2018 at 04:05:45PM -0400, Sinan Kaya wrote: > On 5/17/2018 3:46 PM, Matthew Wilcox wrote: > >> Remember that the CPU core that is running this driver is most probably on > >> the same NUMA node as the device itself. > > Umm ... says who? If my process is running on NUMA node 5 and

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Matthew Wilcox
On Thu, May 17, 2018 at 04:05:45PM -0400, Sinan Kaya wrote: > On 5/17/2018 3:46 PM, Matthew Wilcox wrote: > >> Remember that the CPU core that is running this driver is most probably on > >> the same NUMA node as the device itself. > > Umm ... says who? If my process is running on NUMA node 5 and

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
On 5/17/2018 3:46 PM, Matthew Wilcox wrote: >> Remember that the CPU core that is running this driver is most probably on >> the same NUMA node as the device itself. > Umm ... says who? If my process is running on NUMA node 5 and I submit > an I/O, it should be allocating from a pool on node 5,

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
On 5/17/2018 3:46 PM, Matthew Wilcox wrote: >> Remember that the CPU core that is running this driver is most probably on >> the same NUMA node as the device itself. > Umm ... says who? If my process is running on NUMA node 5 and I submit > an I/O, it should be allocating from a pool on node 5,

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Matthew Wilcox
On Thu, May 17, 2018 at 03:37:21PM -0400, Sinan Kaya wrote: > On 5/17/2018 2:18 PM, Matthew Wilcox wrote: > > On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: > >> Try to keep the pool closer to the device's NUMA node by changing kmalloc() > >> to kmalloc_node() and devres_alloc() to

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Matthew Wilcox
On Thu, May 17, 2018 at 03:37:21PM -0400, Sinan Kaya wrote: > On 5/17/2018 2:18 PM, Matthew Wilcox wrote: > > On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: > >> Try to keep the pool closer to the device's NUMA node by changing kmalloc() > >> to kmalloc_node() and devres_alloc() to

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
On 5/17/2018 2:18 PM, Matthew Wilcox wrote: > On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: >> Try to keep the pool closer to the device's NUMA node by changing kmalloc() >> to kmalloc_node() and devres_alloc() to devres_alloc_node(). > Have you measured any performance gains by

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
On 5/17/2018 2:18 PM, Matthew Wilcox wrote: > On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: >> Try to keep the pool closer to the device's NUMA node by changing kmalloc() >> to kmalloc_node() and devres_alloc() to devres_alloc_node(). > Have you measured any performance gains by

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Matthew Wilcox
On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: > Try to keep the pool closer to the device's NUMA node by changing kmalloc() > to kmalloc_node() and devres_alloc() to devres_alloc_node(). Have you measured any performance gains by doing this? The thing is that these allocations are

Re: [PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Matthew Wilcox
On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: > Try to keep the pool closer to the device's NUMA node by changing kmalloc() > to kmalloc_node() and devres_alloc() to devres_alloc_node(). Have you measured any performance gains by doing this? The thing is that these allocations are

[PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
Try to keep the pool closer to the device's NUMA node by changing kmalloc() to kmalloc_node() and devres_alloc() to devres_alloc_node(). Signed-off-by: Sinan Kaya --- mm/dmapool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/dmapool.c

[PATCH] mm/dmapool: localize page allocations

2018-05-17 Thread Sinan Kaya
Try to keep the pool closer to the device's NUMA node by changing kmalloc() to kmalloc_node() and devres_alloc() to devres_alloc_node(). Signed-off-by: Sinan Kaya --- mm/dmapool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index