Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1248341
| From | "George Spelvin" <linux@horizon.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 0/4] Alternate sclable urandom patchset |
| Date | 2015-10-16 07:30 +0200 |
| Message-ID | <qk5Ky-4QJ-5@gated-at.bofh.it> (permalink) |
| References | <qjjPA-10U-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Sent as separate patches to make things easier to review; the action is all in #4. The first two are minor cleanups I've had in my tree for a while and felt like working on top of rather than backing out. The third I'm not happy with, but will serve as a proof-of-concept stub that I'll rewrite if the rest meets with approval. Since writing it, I've remembered that we already have a per-CPU "nonce pool" in the form of the get_random_int_hash array, and I should take advantage of that. Another thing I don't like is the mixback is only 160 bits, 80 of which are private. I'd rather have twice that, if the read is large enough. But that requires more code refactoring. But it does illustrate the basic idea of using a nonce to avoid the need to do synchronous mixback. We can do many calls to extract_buf, from the same or different processors, without doing mixback. The fourth is where the fun is. The names of things is certainly up for debate; creating a subclass of struct entropy_store called "entropy_store_plus" is not my proudest moment. I also considered just making the extra fields global variables. If someone wants to suggest an arrangement that's good for cache line sharing, that would be appreciated. But I think the nonblocking_mixback() function came out rather nice. This uses two locks, rather that the one in the idea I most recently posted, because add_interrupt_randomness() needs to take the lock, and I didn't want to force it to do an unbounded amount of mixback work. Using two locks avoids the need for interrupt handlers to do any mixback, and for readers to loop and thus possibly livelock. George Spelvin (4): random: Reduce stack usage in _xfer_secondary_pool random: Remove two unused arguments from extract_entropy() random: Only do mixback once per read random: Make non-blocking mixback non-blocking drivers/char/random.c | 218 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 184 insertions(+), 34 deletions(-) -- 2.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-10 21:00 +0200
Re: Updated scalable urandom patchkit Theodore Ts'o <tytso@mit.edu> - 2015-10-11 04:40 +0200
Re: Updated scalable urandom patchkit Theodore Ts'o <tytso@mit.edu> - 2015-10-11 05:00 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-11 06:40 +0200
Re: Updated scalable urandom patchkit Theodore Ts'o <tytso@mit.edu> - 2015-10-12 00:30 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-12 02:20 +0200
Re: Updated scalable urandom patchkit Theodore Ts'o <tytso@mit.edu> - 2015-10-12 06:10 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-12 09:50 +0200
Re: Updated scalable urandom patchkit Theodore Ts'o <tytso@mit.edu> - 2015-10-12 16:00 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-12 22:40 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-12 22:40 +0200
Re: Updated scalable urandom patchkit Theodore Ts'o <tytso@mit.edu> - 2015-10-13 04:50 +0200
Re: Updated scalable urandom patchkit Raymond Jennings <shentino@gmail.com> - 2015-10-13 06:30 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-13 10:00 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-13 08:30 +0200
Re: Updated scalable urandom patchkit Andi Kleen <andi@firstfloor.org> - 2015-10-13 18:30 +0200
Re: Updated scalable urandom patchkit "George Spelvin" <linux@horizon.com> - 2015-10-13 23:20 +0200
Re: Updated scalable urandom patchkit Andi Kleen <andi@firstfloor.org> - 2015-10-14 04:20 +0200
[RFC PATCH 0/4] Alternate sclable urandom patchset "George Spelvin" <linux@horizon.com> - 2015-10-16 07:30 +0200
[RFC PATCH 2/4] random: Remove two unused arguments from extract_entropy() "George Spelvin" <linux@horizon.com> - 2015-10-16 07:40 +0200
[RFC PATCH 4/4] random: Make non-blocking mixback non-blocking "George Spelvin" <linux@horizon.com> - 2015-10-16 07:40 +0200
[RFC PATCH 3/4] random: Only do mixback once per read "George Spelvin" <linux@horizon.com> - 2015-10-16 07:40 +0200
Re: [RFC PATCH 3/4] random: Only do mixback once per read kbuild test robot <lkp@intel.com> - 2015-10-16 08:20 +0200
Re: [RFC PATCH 3/4] random: Only do mixback once per read "George Spelvin" <linux@horizon.com> - 2015-10-16 10:20 +0200
csiph-web