From: Eric Dumazet <eric.dumazet@gmail.com>
To: Shay Agroskin <shayagr@amazon.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Cc: akiyano@amazon.com, davem@davemloft.net, netdev@vger.kernel.org,
dwmw@amazon.com, zorik@amazon.com, matua@amazon.com,
saeedb@amazon.com, msw@amazon.com, aliguori@amazon.com,
nafea@amazon.com, gtzalik@amazon.com, netanel@amazon.com,
alisaidi@amazon.com, benh@amazon.com, ndagan@amazon.com,
sameehj@amazon.com
Subject: Re: [PATCH V2 net-next 1/7] net: ena: avoid unnecessary rearming of interrupt vector when busy-polling
Date: Mon, 13 Jul 2020 13:40:57 -0700 [thread overview]
Message-ID: <6be7744e-a54b-b668-f2a6-3d1dfdd63414@gmail.com> (raw)
In-Reply-To: <pj41zlk0z7rypx.fsf@ua97a68a4e7db56.ant.amazon.com>
On 7/13/20 12:39 PM, Shay Agroskin wrote:
>
> Eric Dumazet <eric.dumazet@gmail.com> writes:
>
>>> + WRITE_ONCE(ena_napi->interrupts_masked, true);
>>> + smp_wmb(); /* write interrupts_masked before calling napi */
>>
>> It is not clear where is the paired smp_wmb()
>>
> Can you please explain what you mean ? The idea of adding the store barrier here is to ensure that the WRITE_ONCE(…) invocation is executed before
> invoking the napi soft irq. From what I gathered using this command would result in compiler barrier (which would prevent it from executing the bool store after napi scheduling) on x86
> and a memory barrier on ARM64 machines which have a weaker consistency model.
Every time you add a smp_wmb() somewhere, the question is raised where the opposite barrier (usually smp_rmb())
is used.
You should document this, pointing where is the opposite smp_rmb()
If you can not find it (READ_ONCE() has no implied smp_rmb()), then
something might be wrong in your patch.
next prev parent reply other threads:[~2020-07-13 20:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-12 22:36 [PATCH V2 net-next 0/7] ENA driver new features akiyano
2020-07-12 22:36 ` [PATCH V2 net-next 1/7] net: ena: avoid unnecessary rearming of interrupt vector when busy-polling akiyano
2020-07-13 16:25 ` Eric Dumazet
2020-07-13 19:39 ` Shay Agroskin
2020-07-13 20:40 ` Eric Dumazet [this message]
2020-07-13 21:26 ` Bshara, Nafea
2020-07-12 22:36 ` [PATCH V2 net-next 2/7] net: ena: add reserved PCI device ID akiyano
2020-07-12 22:36 ` [PATCH V2 net-next 3/7] net: ena: cosmetic: satisfy gcc warning akiyano
2020-07-12 22:36 ` [PATCH V2 net-next 4/7] net: ena: cosmetic: change ena_com_stats_admin stats to u64 akiyano
2020-07-12 22:36 ` [PATCH V2 net-next 5/7] net: ena: add support for traffic mirroring akiyano
2020-07-12 22:36 ` [PATCH V2 net-next 6/7] net: ena: move llq configuration from ena_probe to ena_device_init() akiyano
2020-07-12 22:36 ` [PATCH V2 net-next 7/7] net: ena: support new LLQ acceleration mode akiyano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6be7744e-a54b-b668-f2a6-3d1dfdd63414@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=akiyano@amazon.com \
--cc=aliguori@amazon.com \
--cc=alisaidi@amazon.com \
--cc=benh@amazon.com \
--cc=davem@davemloft.net \
--cc=dwmw@amazon.com \
--cc=gtzalik@amazon.com \
--cc=matua@amazon.com \
--cc=msw@amazon.com \
--cc=nafea@amazon.com \
--cc=ndagan@amazon.com \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=saeedb@amazon.com \
--cc=sameehj@amazon.com \
--cc=shayagr@amazon.com \
--cc=zorik@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).