lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081105191201.GO21867@kernel.dk>
Date:	Wed, 5 Nov 2008 20:12:01 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Tejun Heo <tj@...nel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ