Thread (8 messages) 8 messages, 6 authors, 2018-10-11

Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES

From: Mike Rapoport <hidden>
Date: 2018-10-05 15:05:57
Also in: linux-alpha, linux-arm-kernel, linux-m68k, linux-mips, linux-mm, linux-um, lkml


On October 5, 2018 6:25:38 AM GMT+03:00, Benjamin Herrenschmidt [off-list ref] wrote:
On Fri, 2018-10-05 at 00:07 +0300, Mike Rapoport wrote:
quoted
When a memblock allocation APIs are called with align = 0, the
alignment is
quoted
implicitly set to SMP_CACHE_BYTES.

Replace all such uses of memblock APIs with the 'align' parameter
explicitly
quoted
set to SMP_CACHE_BYTES and stop implicit alignment assignment in the
memblock internal allocation functions.

For the case when memblock APIs are used via helper functions, e.g.
like
quoted
iommu_arena_new_node() in Alpha, the helper functions were detected
with
quoted
Coccinelle's help and then manually examined and updated where
appropriate.
quoted
The direct memblock APIs users were updated using the semantic patch
below:

What is the purpose of this ? It sounds rather counter-intuitive...
Why?
I think it actually more intuitive to explicitly set alignment to SMP_CACHE_BYTES rather than use align = 0 because deeply inside allocator it will be implicitly reset to SMP_CACHE_BYTES...
Ben.
-- 
Sincerely yours,
Mike.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help