On 11/16/2018 06:41 AM, David Laight wrote:
> From: Eric Dumazet
>> Sent: 16 November 2018 14:35
> ...
>> I suggest to use a single cache line with a dedicated spinlock and these
>> three s64
>>
>> spinlock_t tcfp_lock ____cacheline_aligned_in_smp;
>> s64 ...
>> s64 ...
>> s64 ...
>
> Doesn't this do something really stupid when cache lines are big.
> If the spinlock is 8 bytes you never want more than 32 byte alignment.
> If cache lines are 256 bytes you don't even need that.
We do want that, even if cache lines are 256 bytes, thank you.
>
> Also ISTR that the kmalloc() only guarantees 8 byte alignment on x86_64.
> So aligning structure members to larger offsets is rather pointless.
No it is not, we use these hints all the time.
Just double check and report a bug to mm teams if you disagree.
Please do not send feedback if you are not sure.