Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167429
b: refs/heads/master
c: 23e018a
h: refs/heads/master
i:
  167427: 572f8db
v: v3
  • Loading branch information
Jens Axboe committed Oct 5, 2009
1 parent a193143 commit 74cacd7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48e025e63ac908ed6ec5394a294f4ecd510a7476
refs/heads/master: 23e018a1b083ecb4b8bb2fb43d58e7c19b5d7959
8 changes: 0 additions & 8 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2492,14 +2492,6 @@ int kblockd_schedule_work(struct request_queue *q, struct work_struct *work)
}
EXPORT_SYMBOL(kblockd_schedule_work);

int kblockd_schedule_delayed_work(struct request_queue *q,
struct delayed_work *work,
unsigned long delay)
{
return queue_delayed_work(kblockd_workqueue, work, delay);
}
EXPORT_SYMBOL(kblockd_schedule_delayed_work);

int __init blk_dev_init(void)
{
BUILD_BUG_ON(__REQ_NR_BITS > 8 *
Expand Down
24 changes: 11 additions & 13 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct cfq_data {
* idle window management
*/
struct timer_list idle_slice_timer;
struct delayed_work unplug_work;
struct work_struct unplug_work;

struct cfq_queue *active_queue;
struct cfq_io_context *active_cic;
Expand Down Expand Up @@ -268,13 +268,11 @@ static inline int cfq_bio_sync(struct bio *bio)
* scheduler run of queue, if there are requests pending and no one in the
* driver that will restart queueing
*/
static inline void cfq_schedule_dispatch(struct cfq_data *cfqd,
unsigned long delay)
static inline void cfq_schedule_dispatch(struct cfq_data *cfqd)
{
if (cfqd->busy_queues) {
cfq_log(cfqd, "schedule dispatch");
kblockd_schedule_delayed_work(cfqd->queue, &cfqd->unplug_work,
delay);
kblockd_schedule_work(cfqd->queue, &cfqd->unplug_work);
}
}

Expand Down Expand Up @@ -1400,7 +1398,7 @@ static void cfq_put_queue(struct cfq_queue *cfqq)

if (unlikely(cfqd->active_queue == cfqq)) {
__cfq_slice_expired(cfqd, cfqq, 0);
cfq_schedule_dispatch(cfqd, 0);
cfq_schedule_dispatch(cfqd);
}

kmem_cache_free(cfq_pool, cfqq);
Expand Down Expand Up @@ -1495,7 +1493,7 @@ static void cfq_exit_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
{
if (unlikely(cfqq == cfqd->active_queue)) {
__cfq_slice_expired(cfqd, cfqq, 0);
cfq_schedule_dispatch(cfqd, 0);
cfq_schedule_dispatch(cfqd);
}

cfq_put_queue(cfqq);
Expand Down Expand Up @@ -2213,7 +2211,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
}

if (!rq_in_driver(cfqd))
cfq_schedule_dispatch(cfqd, 0);
cfq_schedule_dispatch(cfqd);
}

/*
Expand Down Expand Up @@ -2343,7 +2341,7 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
if (cic)
put_io_context(cic->ioc);

cfq_schedule_dispatch(cfqd, 0);
cfq_schedule_dispatch(cfqd);
spin_unlock_irqrestore(q->queue_lock, flags);
cfq_log(cfqd, "set_request fail");
return 1;
Expand All @@ -2352,7 +2350,7 @@ cfq_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
static void cfq_kick_queue(struct work_struct *work)
{
struct cfq_data *cfqd =
container_of(work, struct cfq_data, unplug_work.work);
container_of(work, struct cfq_data, unplug_work);
struct request_queue *q = cfqd->queue;

spin_lock_irq(q->queue_lock);
Expand Down Expand Up @@ -2406,15 +2404,15 @@ static void cfq_idle_slice_timer(unsigned long data)
expire:
cfq_slice_expired(cfqd, timed_out);
out_kick:
cfq_schedule_dispatch(cfqd, 0);
cfq_schedule_dispatch(cfqd);
out_cont:
spin_unlock_irqrestore(cfqd->queue->queue_lock, flags);
}

static void cfq_shutdown_timer_wq(struct cfq_data *cfqd)
{
del_timer_sync(&cfqd->idle_slice_timer);
cancel_delayed_work_sync(&cfqd->unplug_work);
cancel_work_sync(&cfqd->unplug_work);
}

static void cfq_put_async_queues(struct cfq_data *cfqd)
Expand Down Expand Up @@ -2496,7 +2494,7 @@ static void *cfq_init_queue(struct request_queue *q)
cfqd->idle_slice_timer.function = cfq_idle_slice_timer;
cfqd->idle_slice_timer.data = (unsigned long) cfqd;

INIT_DELAYED_WORK(&cfqd->unplug_work, cfq_kick_queue);
INIT_WORK(&cfqd->unplug_work, cfq_kick_queue);

cfqd->cfq_quantum = cfq_quantum;
cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0];
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -1172,11 +1172,7 @@ static inline void put_dev_sector(Sector p)
}

struct work_struct;
struct delayed_work;
int kblockd_schedule_work(struct request_queue *q, struct work_struct *work);
int kblockd_schedule_delayed_work(struct request_queue *q,
struct delayed_work *work,
unsigned long delay);

#define MODULE_ALIAS_BLOCKDEV(major,minor) \
MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
Expand Down

0 comments on commit 74cacd7

Please sign in to comment.