Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-3.4/core' of git://git.kernel.dk/linux-block

Pull block core bits from Jens Axboe:
"It's a nice and quiet round this time, since most of the tricky stuff
has been pushed to 3.5 to give it more time to mature. After a few
hectic block IO core changes for 3.3 and 3.2, I'm quite happy with a
slow round.

Really minor stuff in here, the only real functional change is making
the auto-unplug threshold a per-queue entity. The threshold is set so
that it's low enough that we don't hold off IO for too long, but still
big enough to get a nice benefit from the batched insert (and hence
queue lock cost reduction). For raid configurations, this currently
breaks down."

* 'for-3.4/core' of git://git.kernel.dk/linux-block:
block: make auto block plug flush threshold per-disk based
Documentation: Add sysfs ABI change for cfq's target latency.
block: Make cfq_target_latency tunable through sysfs.
block: use lockdep_assert_held for queue locking
block: blk_alloc_queue_node(): use caller's GFP flags instead of GFP_KERNEL

+27 -16
+8
Documentation/ABI/testing/sysfs-cfq-target-latency
··· 1 + What: /sys/block/<device>/iosched/target_latency 2 + Date: March 2012 3 + contact: Tao Ma <boyu.mt@taobao.com> 4 + Description: 5 + The /sys/block/<device>/iosched/target_latency only exists 6 + when the user sets cfq to /sys/block/<device>/scheduler. 7 + It contains an estimated latency time for the cfq. cfq will 8 + use it to calculate the time slice used for every task.
+3 -2
block/blk-core.c
··· 483 483 if (!q) 484 484 return NULL; 485 485 486 - q->id = ida_simple_get(&blk_queue_ida, 0, 0, GFP_KERNEL); 486 + q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask); 487 487 if (q->id < 0) 488 488 goto fail_q; 489 489 ··· 1277 1277 list_for_each_entry_reverse(rq, &plug->list, queuelist) { 1278 1278 int el_ret; 1279 1279 1280 - (*request_count)++; 1280 + if (rq->q == q) 1281 + (*request_count)++; 1281 1282 1282 1283 if (rq->q != q || !blk_rq_merge_ok(rq, bio)) 1283 1284 continue;
+1 -1
block/blk-throttle.c
··· 1218 1218 struct bio_list bl; 1219 1219 struct bio *bio; 1220 1220 1221 - WARN_ON_ONCE(!queue_is_locked(q)); 1221 + queue_lockdep_assert_held(q); 1222 1222 1223 1223 bio_list_init(&bl); 1224 1224
+8 -2
block/cfq-iosched.c
··· 295 295 unsigned int cfq_slice_idle; 296 296 unsigned int cfq_group_idle; 297 297 unsigned int cfq_latency; 298 + unsigned int cfq_target_latency; 298 299 299 300 /* 300 301 * Fallback dummy cfqq for extreme OOM conditions ··· 605 604 { 606 605 struct cfq_rb_root *st = &cfqd->grp_service_tree; 607 606 608 - return cfq_target_latency * cfqg->weight / st->total_weight; 607 + return cfqd->cfq_target_latency * cfqg->weight / st->total_weight; 609 608 } 610 609 611 610 static inline unsigned ··· 2272 2271 * to have higher weight. A more accurate thing would be to 2273 2272 * calculate system wide asnc/sync ratio. 2274 2273 */ 2275 - tmp = cfq_target_latency * cfqg_busy_async_queues(cfqd, cfqg); 2274 + tmp = cfqd->cfq_target_latency * 2275 + cfqg_busy_async_queues(cfqd, cfqg); 2276 2276 tmp = tmp/cfqd->busy_queues; 2277 2277 slice = min_t(unsigned, slice, tmp); 2278 2278 ··· 3739 3737 cfqd->cfq_back_penalty = cfq_back_penalty; 3740 3738 cfqd->cfq_slice[0] = cfq_slice_async; 3741 3739 cfqd->cfq_slice[1] = cfq_slice_sync; 3740 + cfqd->cfq_target_latency = cfq_target_latency; 3742 3741 cfqd->cfq_slice_async_rq = cfq_slice_async_rq; 3743 3742 cfqd->cfq_slice_idle = cfq_slice_idle; 3744 3743 cfqd->cfq_group_idle = cfq_group_idle; ··· 3791 3788 SHOW_FUNCTION(cfq_slice_async_show, cfqd->cfq_slice[0], 1); 3792 3789 SHOW_FUNCTION(cfq_slice_async_rq_show, cfqd->cfq_slice_async_rq, 0); 3793 3790 SHOW_FUNCTION(cfq_low_latency_show, cfqd->cfq_latency, 0); 3791 + SHOW_FUNCTION(cfq_target_latency_show, cfqd->cfq_target_latency, 1); 3794 3792 #undef SHOW_FUNCTION 3795 3793 3796 3794 #define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV) \ ··· 3825 3821 STORE_FUNCTION(cfq_slice_async_rq_store, &cfqd->cfq_slice_async_rq, 1, 3826 3822 UINT_MAX, 0); 3827 3823 STORE_FUNCTION(cfq_low_latency_store, &cfqd->cfq_latency, 0, 1, 0); 3824 + STORE_FUNCTION(cfq_target_latency_store, &cfqd->cfq_target_latency, 1, UINT_MAX, 1); 3828 3825 #undef STORE_FUNCTION 3829 3826 3830 3827 #define CFQ_ATTR(name) \ ··· 3843 3838 CFQ_ATTR(slice_idle), 3844 3839 CFQ_ATTR(group_idle), 3845 3840 CFQ_ATTR(low_latency), 3841 + CFQ_ATTR(target_latency), 3846 3842 __ATTR_NULL 3847 3843 }; 3848 3844
+7 -11
include/linux/blkdev.h
··· 426 426 (1 << QUEUE_FLAG_SAME_COMP) | \ 427 427 (1 << QUEUE_FLAG_ADD_RANDOM)) 428 428 429 - static inline int queue_is_locked(struct request_queue *q) 429 + static inline void queue_lockdep_assert_held(struct request_queue *q) 430 430 { 431 - #ifdef CONFIG_SMP 432 - spinlock_t *lock = q->queue_lock; 433 - return lock && spin_is_locked(lock); 434 - #else 435 - return 1; 436 - #endif 431 + if (q->queue_lock) 432 + lockdep_assert_held(q->queue_lock); 437 433 } 438 434 439 435 static inline void queue_flag_set_unlocked(unsigned int flag, ··· 441 445 static inline int queue_flag_test_and_clear(unsigned int flag, 442 446 struct request_queue *q) 443 447 { 444 - WARN_ON_ONCE(!queue_is_locked(q)); 448 + queue_lockdep_assert_held(q); 445 449 446 450 if (test_bit(flag, &q->queue_flags)) { 447 451 __clear_bit(flag, &q->queue_flags); ··· 454 458 static inline int queue_flag_test_and_set(unsigned int flag, 455 459 struct request_queue *q) 456 460 { 457 - WARN_ON_ONCE(!queue_is_locked(q)); 461 + queue_lockdep_assert_held(q); 458 462 459 463 if (!test_bit(flag, &q->queue_flags)) { 460 464 __set_bit(flag, &q->queue_flags); ··· 466 470 467 471 static inline void queue_flag_set(unsigned int flag, struct request_queue *q) 468 472 { 469 - WARN_ON_ONCE(!queue_is_locked(q)); 473 + queue_lockdep_assert_held(q); 470 474 __set_bit(flag, &q->queue_flags); 471 475 } 472 476 ··· 483 487 484 488 static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) 485 489 { 486 - WARN_ON_ONCE(!queue_is_locked(q)); 490 + queue_lockdep_assert_held(q); 487 491 __clear_bit(flag, &q->queue_flags); 488 492 } 489 493