lkml.org 
[lkml]   [2008]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] Block: use round_jiffies_up()
On Wed, Nov 05 2008, Alan Stern wrote:
> On Wed, 5 Nov 2008, Tejun Heo wrote:
>
> > Hello,
> >
> > Alan Stern wrote:
> > > @@ -78,13 +78,14 @@ void blk_delete_timer(struct request *re
> > > /*
> > > * Nothing to detach
> > > */
> > > - if (!q->rq_timed_out_fn || !req->deadline)
> > > + if (!req->deadline)
> > > return;
> > >
> > > list_del_init(&req->timeout_list);
> > >
> > > if (list_empty(&q->timeout_list))
> > > del_timer(&q->timeout);
> > > + req->deadline = 0;
> > > }
> >
> > Actually, this can just be
> >
> > blk_delete_timer()
> > {
> > list_del_init(&req->timeout_list);
> > if (list_empty(&q->timeout_list))
> > del_timer(&q->timeout);
> > }
> >
> > and none of req->deadline trick is necessary.
>
> True. And if we do this, then there's no need to test and increment
> req->deadline in blk_add_timer().

It was an optimization for drivers that don't use block layer timers,
but we can get rid of it.

--
Jens Axboe



\
 
 \ /
  Last update: 2008-11-05 20:15    [W:0.076 / U:3.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site