LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Mel Gorman <mel@csn.ul.ie>
Cc: Jason Wang <jasowang@redhat.com>,
kvm@vger.kernel.org, virtualization@lists.osdl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vhost: rcu annotation fixup
Date: Wed, 19 Jan 2011 07:18:40 +0200 [thread overview]
Message-ID: <20110119051839.GA29467@redhat.com> (raw)
In-Reply-To: <20110119004040.GE18984@csn.ul.ie>
On Wed, Jan 19, 2011 at 12:40:40AM +0000, Mel Gorman wrote:
> On Tue, Jan 18, 2011 at 01:08:45PM +0200, Michael S. Tsirkin wrote:
> > When built with rcu checks enabled, vhost triggers
> > bogus warnings as vhost features are read without
> > dev->mutex sometimes.
> > Fixing it properly is not trivial as vhost.h does not
> > know which lockdep classes it will be used under.
> > Disable the warning by stubbing out the check for now.
> >
>
> What is the harm in leaving the bogus warnings until the difficult fix
> happens? RCU checks enabled does not seem like something that is enabled
> in production.
I would like to run with rcu checks enabled sometimes to debug kvm,
which has an elaborate rcu strategy. Bogus warnings in the log
make it easy to overlook the real ones. Further, the rcu macros
used are a form of documentation. If we have
- rcu_dereference_index_check(dev->acked_features,
- lockdep_is_held(&dev->mutex));
this means 'taken in rcu read side critical section or under mutex',
+ acked_features = rcu_dereference_index_check(dev->acked_features, 1);
means 'not checked'.
> If this patch is applied, there is always the risk that
> it'll be simply forgotten about.
Well, that's why I put in a TODO.
If there's a demand for that, I can add a Kconfig option to
trigger a warning at each unchecked rcu call in vhost-net
but I doubt it'll get a lof of use :)
> --
> Mel Gorman
> Part-time Phd Student Linux Technology Center
> University of Limerick IBM Dublin Software Lab
prev parent reply other threads:[~2011-01-19 5:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 11:08 Michael S. Tsirkin
2011-01-18 17:48 ` Paul E. McKenney
2011-01-18 17:55 ` Michael S. Tsirkin
2011-01-18 19:02 ` Paul E. McKenney
2011-01-18 20:10 ` Michael S. Tsirkin
2011-01-18 20:28 ` Paul E. McKenney
2011-01-19 0:40 ` Mel Gorman
2011-01-19 5:18 ` Michael S. Tsirkin [this message]
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=20110119051839.GA29467@redhat.com \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.osdl.org \
--subject='Re: [PATCH] vhost: rcu annotation fixup' \
/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
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).