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: <fa686aa40903111945g53a0ba5au200fe9362e315175@mail.gmail.com>
Date:	Wed, 11 Mar 2009 20:45:57 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc:	Timur Tabi <timur@...escale.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	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()

On Wed, Mar 11, 2009 at 3:58 PM, Benjamin Herrenschmidt
<benh@...nel.crashing.org> wrote:
> On Wed, 2009-03-11 at 13:18 -0500, Timur Tabi wrote:
>> Alan Cox wrote:
>> >> Are you talking about the udelay() inside the loop?  If so, I agree
>> >> that this is bad and have removed it in the PowerPC-specific version:
>> >
>> > The behaviour you want there is system specific - 10uS is a minimum
>> > politeness value for x86 PCI bus for example.
>>
>> So we need to allow for delays between successive rights?  We can
>> provide that with a third parameter to the macro.
>
> I prefer Alan's method of having the macro be followed by { and } so we
> can add things in there. The delay between access will often be somewhat
> platform or device specific, and some drivers might be able to do useful
> things while spinning.
>
> The other big advantage of that approach is that drivers that aren't in
> an atomic section can use msleep() and allow the kernel to schedule on
> that processor.

Ack!  I totally agree.

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
--
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