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:	Fri, 13 Mar 2009 14:03:41 +1100
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Timur Tabi <timur@...escale.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org, rdreier@...co.com,
	jirislaby@...il.com, will.newton@...il.com, hancockrwd@...il.com,
	jeremy@...p.org
Subject: Re: [PATCH v4] introduce macro spin_event_timeout()


> But that's the thing - I don't want a required delay inside the loop.
> 
> I guess I'm going to have to think about this for a while.  I'd like
> to see something like cycles_per_usec() as a companion function to
> get_cycles().

I think that's where you're wrong :-)

Just require the delay inside the loop, it will make everything nicer.
There are also some good reasons to do that:

 - The delay between "polls" of the register may have to be controlled,
for example some HW will choke if polled too fast

 - If you aren't in an atomic section, you may want to use msleep() and
thus be schedule friendly

 - It fixes all the problems mentioned earlier

Cheers,
Ben.

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