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] [day] [month] [year] [list]
Date:	Tue, 29 Jul 2008 11:42:08 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Ralf Baechle <ralf@...ux-mips.org>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] Char: ds1286, eliminate busy waiting

Ralf Baechle napsal(a):
> On Fri, Jul 25, 2008 at 07:49:58PM +0200, Jiri Slaby wrote:
> 
>> ds1286_get_time(); is not called from atomic context, sleep for 20 ms is
>> better choice than a (home-made) busy waiting for such a situation.

> Looks ok to me I guess.  Though I don't really think it matters ...

I think RT people has different opinion ;).

> The same condition also appears in drivers/char/rtc.c and maybe a few
> others.  Rtc.c has been copies and modified several times.

In rtc.c there is something completely different:
         while (rtc_is_updating() != 0 &&
                time_before(jiffies, uip_watchdog + 2*HZ/100))
                 cpu_relax();

It's a conditional busy-waiting. It reads the rtc status after each busy 
cycle while in the ds1286 there was
         if (ds1286_is_updating() != 0)
                 while (time_before(jiffies, uip_watchdog + 2*HZ/100))
                         barrier();
--
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