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]
Date:	Tue, 11 Nov 2008 12:11:53 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
cc:	jens.axboe@...cle.com, <James.Bottomley@...senPartnership.com>,
	<linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: Problems with the block-layer timeouts

On Tue, 11 Nov 2008, FUJITA Tomonori wrote:

> I don't worry about anything. I just think that these round_jiffies_up
> are pointless because they were added for the block-layer users that
> care about exact timeouts, however the block-layer doesn't export
> blk_add_timer() so the block-layer users can't control the exact time
> when the timer starts. So doing round_jiffies_up calculation per every
> request doesn't make sense for me.

In fact the round_jiffies_up() routines were added for other users as
well as the block layer.  However none of the others could be changed
until the routines were merged.  Now that the routines are in the 
mainline, you should see them start to be called in multiple places.

Also, the users of the block layer _don't_ care about exact timeouts.  
That's an important aspect of round_jiffies() and round_jiffies_up() --
you don't use them if you want an exact timeout.

The reason for using round_jiffies() is to insure that the timeout
will occur at a 1-second boundary.  If several timeouts are set for
about the same time and they all use round_jiffies() or
round_jiffies_up(), then they will all occur at the same tick instead
of spread out among several different ticks during the course of that
1-second interval.  As a result, the system will need to wake up only
once to service all those timeouts, instead of waking up several
different times.  It is a power-saving scheme.

Alan Stern

--
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