summaryrefslogtreecommitdiff
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-07-08 15:19:18 -0700
committerKent Overstreet <kmo@daterainc.com>2013-08-07 10:54:17 -0700
commit78742d998597406b336a6d8b3483b060469ebc79 (patch)
treef33f8d8ca570e9725ebb1ba3990fd99d33be7d81 /include/linux/cgroup.h
parent3d52184ce9963200614691780d8e045817f847fb (diff)
idr: Remove unneeded idr locking, idr_preload() usage
Our new idr implementation does its own locking, instead of forcing it onto the callers like the old implementation. Many of the existing idr users need locking for more than just idr_alloc()/idr_remove()/idr_find() - they're taking refcounts and such under their locks and we can't touch those. But a significant number of users had locks that protected nothing more than the idr data structures itself - those we can get rid of. Note that we have to be careful when removing locks; in some places, locks appear to only be protecting idr_alloc()/idr_remove() calls but they're also used by other code that needs to ensure the idr isn't modified while it's doing something else - so ideally we want to delete the lock that protected the idr, or else we have to carefully audit all the other places it's used. There's also a fair number of places where things were being done under the idr lock unnecessarily; drivers/dca/dca-sysfs.c is a good example. dca->id is set to the id idr_alloc() returns under the lock - but there's no idr_find() calls under the lock, and dca->id isn't touched in the idr_remove() paths. So the lock can be safely deleted. The really nice thing about deleting this unnecessary locking is that it lets us trivially delete a lot of now unnecessary idr_preload() - with idr doing its own locking, we can pass GFP_KERNEL to idr_alloc() just fine. Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Tejun Heo <tj@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: Tom Tucker <tom@opengridcomputing.com> Cc: Steve Wise <swise@opengridcomputing.com> Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Alex Dubov <oakad@yahoo.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Chris Ball <cjb@laptop.org> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Willem Riede <osst@riede.org> Cc: "Kai Mäkisara" <Kai.Makisara@kolumbus.fi> Cc: "Nicholas A. Bellinger" <nab@linux-iscsi.org> Cc: Li Zefan <lizefan@huawei.com> Cc: Vlad Yasevich <vyasevich@gmail.com> Cc: Neil Horman <nhorman@tuxdriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Dave Airlie <airlied@redhat.com> Cc: Alon Levy <alevy@redhat.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: Christoph Hellwig <hch@lst.de> Cc: linux-kernel@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-rdma@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: osst-users@lists.sourceforge.net Cc: target-devel@vger.kernel.org Cc: containers@lists.linux-foundation.org Cc: cgroups@vger.kernel.org Cc: linux-sctp@vger.kernel.org Cc: netdev@vger.kernel.org
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e9ac882868c0..964779a11a80 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -622,7 +622,6 @@ struct cgroup_subsys {
struct list_head sibling;
/* used when use_id == true */
struct idr idr;
- spinlock_t id_lock;
/* list of cftype_sets */
struct list_head cftsets;