aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-02-07 01:51:30 -0500
committerJens Axboe <axboe@kernel.dk>2012-02-07 01:51:30 -0500
commit11a3122f6cf2d988a77eb8883d0fc49cd013a6d5 (patch)
treeded8ea8a2982754ff0c58448a7ed2e59487104cb /include
parent822bfa51ce44f2c63c300fdb76dc99c4d5a5ca9f (diff)
block: strip out locking optimization in put_io_context()
put_io_context() performed a complex trylock dancing to avoid deferring ioc release to workqueue. It was also broken on UP because trylock was always assumed to succeed which resulted in unbalanced preemption count. While there are ways to fix the UP breakage, even the most pathological microbench (forced ioc allocation and tight fork/exit loop) fails to show any appreciable performance benefit of the optimization. Strip it out. If there turns out to be workloads which are affected by this change, simpler optimization from the discussion thread can be applied later. Signed-off-by: Tejun Heo <tj@kernel.org> LKML-Reference: <1328514611.21268.66.camel@sli10-conroe> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h3
-rw-r--r--include/linux/iocontext.h5
2 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6c6a1f008065..606cf339bb56 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -399,9 +399,6 @@ struct request_queue {
399 /* Throttle data */ 399 /* Throttle data */
400 struct throtl_data *td; 400 struct throtl_data *td;
401#endif 401#endif
402#ifdef CONFIG_LOCKDEP
403 int ioc_release_depth;
404#endif
405}; 402};
406 403
407#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ 404#define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index 7e1371c4bccf..119773eebe31 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -133,7 +133,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc)
133 133
134struct task_struct; 134struct task_struct;
135#ifdef CONFIG_BLOCK 135#ifdef CONFIG_BLOCK
136void put_io_context(struct io_context *ioc, struct request_queue *locked_q); 136void put_io_context(struct io_context *ioc);
137void exit_io_context(struct task_struct *task); 137void exit_io_context(struct task_struct *task);
138struct io_context *get_task_io_context(struct task_struct *task, 138struct io_context *get_task_io_context(struct task_struct *task,
139 gfp_t gfp_flags, int node); 139 gfp_t gfp_flags, int node);
@@ -141,8 +141,7 @@ void ioc_ioprio_changed(struct io_context *ioc, int ioprio);
141void ioc_cgroup_changed(struct io_context *ioc); 141void ioc_cgroup_changed(struct io_context *ioc);
142#else 142#else
143struct io_context; 143struct io_context;
144static inline void put_io_context(struct io_context *ioc, 144static inline void put_io_context(struct io_context *ioc) { }
145 struct request_queue *locked_q) { }
146static inline void exit_io_context(struct task_struct *task) { } 145static inline void exit_io_context(struct task_struct *task) { }
147#endif 146#endif
148 147