From: Arnd Bergmann <arnd@arndb.de>
To: vyasevic@redhat.com
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org, davem@davemloft.net, mst@redhat.com,
jasowang@redhat.com
Subject: Re: [PATCH net-next 1/2] macvtap: Let TUNSETOFFLOAD actually controll offload features.
Date: Thu, 20 Jun 2013 00:38:47 +0200 [thread overview]
Message-ID: <201306200038.47859.arnd@arndb.de> (raw)
In-Reply-To: <51C1FF7B.9050502@redhat.com>
On Wednesday 19 June 2013, Vlad Yasevich wrote:
> Arnd
>
> MST suggested I add you. Do you remember the reason
> why macvtap uses rcu_read_lock_bh() instead of plain
> rcu_read_lock()? Additionally it seems to use
> synchronize_rcu(), not the _bh() version.
I don't actually remember, but looking back at the git history, it
seemst to come from one of the earliest versions of the code, and
the locking was changed soon after that. Originally I needed
rcu_read_lock for any function called from the network stack,
which is equivalent to rcu_read_lock_bh as it is run from the
network softirq. Using rcu_read_lock_bh for functions called from
the chardev file operations might not be necessary but was
consistent at the time.
Looking at the state now, I think calling synchronize_rcu()
instead of synchronize_rcu_bh() is not a bug but implies
a longer grace period than necessary (I'm not sure about that)
and extra overhead from disabling softirqs in rcu_read_lock.
It's probably a good idea to revisit this and do it right.
Arnd
next prev parent reply other threads:[~2013-06-19 22:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 14:47 [PATCH net-next 0/2] macvtap: Add support for offload control Vlad Yasevich
2013-06-19 14:47 ` [PATCH net-next 1/2] macvtap: Let TUNSETOFFLOAD actually controll offload features Vlad Yasevich
2013-06-19 15:16 ` Michael S. Tsirkin
2013-06-19 15:47 ` Vlad Yasevich
2013-06-19 15:55 ` Michael S. Tsirkin
2013-06-19 17:05 ` Vlad Yasevich
2013-06-19 18:17 ` Michael S. Tsirkin
2013-06-19 15:17 ` Eric Dumazet
2013-06-19 15:26 ` Vlad Yasevich
2013-06-19 15:46 ` Eric Dumazet
2013-06-19 16:20 ` Vlad Yasevich
2013-06-19 16:34 ` Eric Dumazet
2013-06-19 18:59 ` Vlad Yasevich
2013-06-19 22:38 ` Arnd Bergmann [this message]
2013-06-19 14:47 ` [PATCH net-next 2/2] macvtap: Perform GSO on forwarding path Vlad Yasevich
2013-06-19 15:30 ` Michael S. Tsirkin
2013-06-19 16:27 ` Vlad Yasevich
2013-06-19 16:22 ` Vlad Yasevich
2013-06-19 18:09 ` Sergei Shtylyov
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=201306200038.47859.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=vyasevic@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.