login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
26
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq_init_queue()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Paul E. McKenney
Subject:
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq_init_queue()
Date: Monday, April 26, 2010 - 7:45 am
On Mon, Apr 26, 2010 at 09:39:20AM -0400, Vivek Goyal wrote:
quoted text
> On Sun, Apr 25, 2010 at 07:06:31PM -0700, Paul E. McKenney wrote: > > On Mon, Apr 26, 2010 at 09:33:46AM +0800, Li Zefan wrote: > > > >>>>>> With RCU correctness on, We see following warning. This patch fixes it. > > > >>>>> This is in initialization code, so that there cannot be any concurrent > > > >>>>> updates, correct? If so, looks good. > > > >>>>> > > > >>>> I think theoritically two instances of cfq_init_queue() can be running > > > >>>> in parallel (for two different devices), and they both can call > > > >>>> blkiocg_add_blkio_group(). But then we use a spin lock to protect > > > >>>> blkio_cgroup. > > > >>>> > > > >>>> spin_lock_irqsave(&blkcg->lock, flags); > > > >>>> > > > >>>> So I guess two parallel updates should be fine. > > > >>> OK, in that case, would it be possible add this spinlock to the condition > > > >>> checked by css_id()'s rcu_dereference_check()? > > > >> Hi Paul, > > > >> > > > >> I think adding these spinlock to condition checked might become little > > > >> messy. And the reason being that this lock is subsystem (controller) > > > >> specific and maintained by controller. Now if any controller implements > > > >> a lock and we add that lock in css_id() rcu_dereference_check(), it will > > > >> look ugly. > > > >> > > > >> So probably a better way is to make sure that css_id() is always called > > > >> under rcu read lock so that we don't hit this warning? > > > > > > > > As long as holding rcu_read_lock() prevents css_id() from the usual > > > > problems such as access memory that was concurrently freed, yes. > > > > > > blkiocg_add_blkio_group() also calls cgroup_path(), which also needs to > > > be called within rcu_read_lock, so I think Vivek's patch is better than > > > the one you posted in another mail thread. > > > > My apologies, Vivek! I lost track of your patch. I have now replaced > > my patch with yours. > > Thanks Paul. > > I sent this patch to Jens also, thinking he will apply to his tree. Looks > like he has not applied it yet though. > > Jens, is it ok if this patch gets merged through paul's tree or should it > go through blk tree?
I am happy for it to go either way, so just let me know! Thanx, Paul --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] blk-cgroup: Fix RCU correctness warning in cfq_ini ...
, Vivek Goyal
, (Thu Apr 22, 8:54 am)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Thu Apr 22, 4:15 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Vivek Goyal
, (Thu Apr 22, 4:55 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Thu Apr 22, 5:17 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Vivek Goyal
, (Fri Apr 23, 7:41 am)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Fri Apr 23, 12:46 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Li Zefan
, (Sun Apr 25, 6:33 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Sun Apr 25, 7:06 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Vivek Goyal
, (Mon Apr 26, 6:39 am)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Mon Apr 26, 7:45 am)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Vivek Goyal
, (Mon Apr 26, 1:42 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Mon Apr 26, 1:47 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Vivek Goyal
, (Mon Apr 26, 1:52 pm)
Re: [PATCH] blk-cgroup: Fix RCU correctness warning in cfq ...
, Paul E. McKenney
, (Tue Apr 27, 5:16 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate