From: "George Spelvin" <linux@horizon.com>
To: linux@horizon.com, tytso@mit.edu
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH-v2 4/4] random: clean up interrupt entropy accounting for archs w/o cycle counters
Date: 14 Jun 2014 12:23:19 -0400 [thread overview]
Message-ID: <20140614162319.17191.qmail@ns.horizon.com> (raw)
In-Reply-To: <20140614160041.GI6447@thunk.org>
I agree with your points, with one exception. Which may be
me misunderstanding.
> Also note that the question is not whether the non-timer interrupt
> rate is less than 32 seconds, but rather out of the last 64
> interrupts, how many of the interrupts come from non-timer sources?
> That's not the same thing, especially if you are running in tickless
> mode, which most modern kernels for mobile handsets would want to do
> for the obvious power savings reason. Indeed the main concern on most
> mobile handsets is that there aren't that many interrupts to begin
> with, because they've been optimized out as much as possible.
When you say "the question is", do you mean that's what you eant
the code to do? Because that's not what it does right now.
The condition for not spilling is
if ((fast_pool->count & 63) && !time_after(now, fast_pool->last + HZ))
return;
In other words, spill if there have been 64 samples *or* 1 second since
the last spill.
> The real answer is that ARM manufacuters have to get off their !@#!@?
> duff and give us either a real clock cycle counter, or a real hardware
> randum number generator, or both...
I've thought of beating the RTC against the main oscillator.
But which I know a lot of SoCs have an battery-backed RTC, I don't
know how universal an RTC is.
The other nice source is an otherwise unused ADC. Even if the input
is shorted out, there's lsbit noise. but again, not everything has
an audio ADC.
prev parent reply other threads:[~2014-06-14 16:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 7:15 [PATCH-v2 1/4] random: always update the entropy pool under the spinlock Theodore Ts'o
2014-06-14 7:15 ` [PATCH-v2 2/4] random: remove unneeded hash of a portion of the entropy pool Theodore Ts'o
2014-06-14 7:15 ` [PATCH-v2 3/4] random: only update the last_pulled time if we actually transferred entropy Theodore Ts'o
2014-06-14 7:15 ` [PATCH-v2 4/4] random: clean up interrupt entropy accounting for archs w/o cycle counters Theodore Ts'o
2014-06-14 7:28 ` George Spelvin
2014-06-14 16:00 ` Theodore Ts'o
2014-06-14 16:23 ` George Spelvin [this message]
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=20140614162319.17191.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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®