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, 10 Mar 2009 14:04:50 -0500
From:	Timur Tabi <timur@...escale.com>
To:	Grant Likely <grant.likely@...retlab.ca>
CC:	linux-kernel@...r.kernel.org, rdreier@...co.com,
	jirislaby@...il.com, peterz@...radead.org, will.newton@...il.com,
	hancockrwd@...il.com, jeremy@...p.org
Subject: Re: [PATCH v4] introduce macro spin_event_timeout()

Grant Likely wrote:

> I typically use something in the form of this pattern on powerpc code
> when I absolutely have to busywait.
>     int end_ts = get_tbl() + some_delay;  /* note that this is signed */
>     while (end_ts - get_tbl() > 0)
>         if (condition)
>             break;

Funny you mention this, because I was just about to implement the same
thing.  Of course, it will be a PowerPC-only function, but I suppose
that's its fate regardless.

> This macro also looks like a tempting unbounded latency tarpit to fall
> into when people start using it in critical regions,  but that goes
> for code using a non-timed-out busywait also.

I can't fix everything!

-- 
Timur Tabi
Linux kernel developer at Freescale
--
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