On Tue, Apr 24, 2018 at 8:38 PM, Eric Dumazet [off-list ref] wrote:
On 04/24/2018 05:05 AM, Yafang Shao wrote:
quoted
This revert commit <c6849a3ac17e> ("net: init sk_cookie for inet socket")
Per discussion with Eric.
I suggest you include a bit more details, about cache line false sharing.
Coud we adjust the struct common to avoid such kind of cache line
false sharing ?
I mean removing "atomic64_t skc_cookie;" from struct sock_common and
place it in struct inet_sock ?
Thanks
Yafang
From: Eric Dumazet <hidden> Date: 2018-04-24 15:49:44
On 04/24/2018 08:12 AM, Yafang Shao wrote:
On Tue, Apr 24, 2018 at 8:38 PM, Eric Dumazet [off-list ref] wrote:
quoted
On 04/24/2018 05:05 AM, Yafang Shao wrote:
quoted
This revert commit <c6849a3ac17e> ("net: init sk_cookie for inet socket")
Per discussion with Eric.
I suggest you include a bit more details, about cache line false sharing.
Coud we adjust the struct common to avoid such kind of cache line
false sharing ?
I mean removing "atomic64_t skc_cookie;" from struct sock_common and
place it in struct inet_sock ?
The false sharing is not there, it is on net->cookie_gen
On Tue, Apr 24, 2018 at 11:49 PM, Eric Dumazet [off-list ref] wrote:
On 04/24/2018 08:12 AM, Yafang Shao wrote:
quoted
On Tue, Apr 24, 2018 at 8:38 PM, Eric Dumazet [off-list ref] wrote:
quoted
On 04/24/2018 05:05 AM, Yafang Shao wrote:
quoted
This revert commit <c6849a3ac17e> ("net: init sk_cookie for inet socket")
Per discussion with Eric.
I suggest you include a bit more details, about cache line false sharing.
Coud we adjust the struct common to avoid such kind of cache line
false sharing ?
I mean removing "atomic64_t skc_cookie;" from struct sock_common and
place it in struct inet_sock ?
The false sharing is not there, it is on net->cookie_gen
Yes.
This is the current issue.
May be we should adjust struct net as well.
Regarding sk_cookie, as it is only used by inet_sock now, may be it is
better placed in srtuct inet_sock ?
Thanks
Yafang
From: Eric Dumazet <hidden> Date: 2018-04-24 16:10:09
On 04/24/2018 08:59 AM, Yafang Shao wrote:
On Tue, Apr 24, 2018 at 11:49 PM, Eric Dumazet [off-list ref] wrote:
quoted
On 04/24/2018 08:12 AM, Yafang Shao wrote:
quoted
On Tue, Apr 24, 2018 at 8:38 PM, Eric Dumazet [off-list ref] wrote:
quoted
On 04/24/2018 05:05 AM, Yafang Shao wrote:
quoted
This revert commit <c6849a3ac17e> ("net: init sk_cookie for inet socket")
Per discussion with Eric.
I suggest you include a bit more details, about cache line false sharing.
Coud we adjust the struct common to avoid such kind of cache line
false sharing ?
I mean removing "atomic64_t skc_cookie;" from struct sock_common and
place it in struct inet_sock ?
The false sharing is not there, it is on net->cookie_gen
Yes.
This is the current issue.
May be we should adjust struct net as well.
This field will still need to be modified by many cpus.
Its exact placement in memory wont avoid false sharing and stalls.
Regarding sk_cookie, as it is only used by inet_sock now, may be it is
better placed in srtuct inet_sock ?
You are mistaken.
It is used on all sockets really (including request_sock and timewait)
ss -temoia will give you socket ids for all sockets types.