[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2bfef133-8dbf-728c-f815-929291b4c68e@gmail.com>
Date: Fri, 16 Nov 2018 06:55:34 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Laight <David.Laight@...LAB.COM>,
'Eric Dumazet' <eric.dumazet@...il.com>,
Davide Caratti <dcaratti@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/2] net/sched: act_police: don't use spinlock in
the data path
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.
Powered by blists - more mailing lists