[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+dqWytEiB+CTsF2drNN3Jg7DY7rbhjTDiiVDWizY3jCQ@mail.gmail.com>
Date: Tue, 5 Nov 2019 08:50:55 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Deepa Dinamani <deepa.kernel@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH net] net: prevent load/store tearing on sk->sk_stamp
On Tue, Nov 5, 2019 at 8:25 AM Deepa Dinamani <deepa.kernel@...il.com> wrote:
> I do not see any harm with this. Does it cause performance degradation?
>
It does not change compiler output, at least for common GCC versions.
It would change things if a hypothetical caller would do for example :
ktime_t res;
res = sock_read_timestamp(sk);
res = sock_read_timestamp(sk);
Since without the READ_ONCE(), compiler could remove the first instance.
> Acked-by: Deepa Dinamani <deepa.kernel@...il.com>
>
> -Deepa
Powered by blists - more mailing lists