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, 08 May 2012 15:22:54 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	dedekind1@...il.com
Cc:	Richard Weinberger <richard@....at>, linux-mtd@...ts.infradead.org,
	dwmw2@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] UBI: Replace yield() with cond_resched()

On Tue, 2012-05-08 at 16:23 +0300, Artem Bityutskiy wrote:
> On Tue, 2012-05-08 at 12:59 +0200, Richard Weinberger wrote:
> > > The purpose was different. If we have I/O error, we hope it is a
> > > transient failure. E.g., the HW is temporary unavailable because of an
> > > internal issue. And with yield() we hoped to schedule away for longer
> > > time than usual and let other processes which may affect that HW go
> > > forward and do something.
> > 
> > Okay, yield() is clearly the wrong choice here.
> > cond_resched() is better.
> 
> I do not think it is better. Yes, for I/O I'd suggest
> msleep_interruptible(200) instead.

At least document the intent of that random sleep. Otherwise we'll be
having this same discussion again in a few years or so ;-)
--
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