mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Tejun Heo <tj@kernel.org>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] Block: use round_jiffies_up()
Date: Wed, 5 Nov 2008 20:12:01 +0100	[thread overview]
Message-ID: <20081105191201.GO21867@kernel.dk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0811051120220.2573-100000@iolanthe.rowland.org>

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


  reply	other threads:[~2008-11-05 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 16:15 Alan Stern
2008-11-05  3:34 ` Tejun Heo
2008-11-05 16:21   ` Alan Stern
2008-11-05 19:12     ` Jens Axboe [this message]
2008-11-05 21:19       ` [PATCH 2/2 ver 2] " Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081105191201.GO21867@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®