From 4ddc5e3d3a3cf649ce5b0d6edc9ac5234018957d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 1 Jun 2010 12:23:18 +0200 Subject: [PATCH] --- yaml --- r: 199909 b: refs/heads/master c: 28f4197e5d4707311febeec8a0eb97cb5fd93c97 h: refs/heads/master i: 199907: c2100a7d1e056de8a294cf6508a81c3c939a49b4 v: v3 --- [refs] | 2 +- trunk/include/linux/blkdev.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9bad937c1ab9..8550cd83fa80 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 713b686494a577b3c4f4f9f585a4705fc30d51c2 +refs/heads/master: 28f4197e5d4707311febeec8a0eb97cb5fd93c97 diff --git a/trunk/include/linux/blkdev.h b/trunk/include/linux/blkdev.h index 8b7f5e0914ad..09a840264d6f 100644 --- a/trunk/include/linux/blkdev.h +++ b/trunk/include/linux/blkdev.h @@ -1211,14 +1211,23 @@ struct work_struct; int kblockd_schedule_work(struct request_queue *q, struct work_struct *work); #ifdef CONFIG_BLK_CGROUP +/* + * This should not be using sched_clock(). A real patch is in progress + * to fix this up, until that is in place we need to disable preemption + * around sched_clock() in this function and set_io_start_time_ns(). + */ static inline void set_start_time_ns(struct request *req) { + preempt_disable(); req->start_time_ns = sched_clock(); + preempt_enable(); } static inline void set_io_start_time_ns(struct request *req) { + preempt_disable(); req->io_start_time_ns = sched_clock(); + preempt_enable(); } static inline uint64_t rq_start_time_ns(struct request *req)