[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES

On October 5, 2018 6:25:38 AM GMT+03:00, Benjamin Herrenschmidt <> wrote:
>On Fri, 2018-10-05 at 00:07 +0300, Mike Rapoport wrote:
>> When a memblock allocation APIs are called with align = 0, the
>alignment is
>> implicitly set to SMP_CACHE_BYTES.
>> Replace all such uses of memblock APIs with the 'align' parameter
>> 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.
>> iommu_arena_new_node() in Alpha, the helper functions were detected
>> Coccinelle's help and then manually examined and updated where
>> The direct memblock APIs users were updated using the semantic patch
>What is the purpose of this ? It sounds rather counter-intuitive...

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...


Sincerely yours,

 \ /
  Last update: 2018-10-05 17:06    [W:0.121 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site