projects/linux·commit 4671a132

block: don't access jiffies when initialising io_context

4671a132 · Richard Kennedy <[email protected]> · 2010-03-01 10:57:22 +01:00

As the comment says the initial value of last_waited is never used, so
there is no need to initialise it with the current jiffies. Jiffies is
hot enough without accessing it for no reason.

Signed-off-by: Richard Kennedy <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Commit
4671a1322052425afa38fcb7980d2fd2bb0fc99b
Parents
73e9ffdd

Changes

1 files changed · +1 −1

FileStatusAddDelContent
block/blk-ioc.cmodified+1−1View file

block/blk-ioc.c

View file
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 98e6bf6..3f65c8a 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -91,7 +91,7 @@ struct io_context *alloc_io_context(gfp_t gfp_flags, int node)
spin_lock_init(&ret->lock);
ret->ioprio_changed = 0;
ret->ioprio = 0;
- ret->last_waited = jiffies; /* doesn't matter... */
+ ret->last_waited = 0; /* doesn't matter... */
ret->nr_batch_requests = 0; /* because this is 0 */
INIT_RADIX_TREE(&ret->radix_root, GFP_ATOMIC | __GFP_HIGH);
INIT_HLIST_HEAD(&ret->cic_list);