mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Valdis.Kletnieks@vt.edu
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.17-rc4-mm3
Date: Mon, 22 May 2006 13:25:10 +0200	[thread overview]
Message-ID: <200605221325.10761.mb@bu3sch.de> (raw)
In-Reply-To: <200605221115.k4MBFq42013901@turing-police.cc.vt.edu>

On Monday 22 May 2006 13:15, you wrote:
> On Mon, 22 May 2006 02:27:09 PDT, Andrew Morton said:
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc4/2.6.17-rc4-mm3/
> 
> Mostly works, am chasing down 3 small things (all 3 were new as of -mm2 - I was
> busy chasing them when -mm3 showed up).
> 
> 1) Something has gone astray in the hardware RNG rework.  /sbin/rngd was
> quite happy dealing with the i810 RNG in my laptop under -rc4-mm1, but under
> -mm2 and -mm3, I get this (from strace /bin/rngd):
> 
> open("/dev/hw_random", O_RDONLY)        = 3
> read(3, "q\252cg", 4)                   = 4
> read(3, 0xbfaf56ac, 4)                  = -1 EAGAIN (Resource temporarily unavai lable)
> 
> It works for some number of reads, but eventually pulls an EAGAIN.  When
> stracing on a console that was slow-to-scroll, it did several dozen before
> failing - so it's apparently a timing thing.  I stuck a debugging printk
> in just before the test that returns EAGAIN, and got this:
> 
> [   68.361000] rng_read data_present=1 i=0 bytes_read=1
> [   68.361000] rng_read data_present=1 i=0 bytes_read=1
> [   68.361000] rng_read data_present=1 i=0 bytes_read=1
> [   68.361000] rng_read data_present=1 i=0 bytes_read=1
> [   68.361000] rng_read data_present=0 i=20 bytes_read=0
> 
> It looks to me line the old code stayed in a while() loop in rng_dev_read
> until it had fulfilled the read request (including possibly multiple
> calls to need_resched() and friends).  The new code will bail on an -EAGAIN
> as soon as the *first* poll fails, rather than waiting until something
> is available - even if it is NOT flagged O_NONBLOCK.

Yeah. That is how it works. I am wondering why userspace doesn't
simply retry, if it receives an EAGAIN.
Should we return ERESTARTSYS or something like that instead?

  reply	other threads:[~2006-05-22 11:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-22  9:27 2.6.17-rc4-mm3 Andrew Morton
2006-05-22 11:15 ` 2.6.17-rc4-mm3 Valdis.Kletnieks
2006-05-22 11:25   ` Michael Buesch [this message]
2006-05-22 11:35     ` 2.6.17-rc4-mm3 Andrew Morton
2006-05-22 11:38     ` 2.6.17-rc4-mm3 Valdis.Kletnieks
2006-05-22 11:49       ` 2.6.17-rc4-mm3 Michael Buesch
2006-05-22 12:46         ` 2.6.17-rc4-mm3 Valdis.Kletnieks
2006-05-23  9:43 ` 2.6.17-rc4-mm3 (can't compile kexec/ia64 on DIG) KAMEZAWA Hiroyuki
2006-05-23 21:07 ` 2.6.17-rc4-mm3 Michal Piotrowski
2006-05-23 21:35   ` [Alsa-devel] 2.6.17-rc4-mm3 Lee Revell
2006-05-23 21:51     ` Michal Piotrowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605221325.10761.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®