[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9pbSRXuuFgXzLvKS=faJ0_7TOHCZGZg49=0+Yc=cO6-6w@mail.gmail.com>
Date: Fri, 20 Jan 2017 16:47:42 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: "Theodore Ts'o" <tytso@....edu>,
"Jason A. Donenfeld" <Jason@...c4.com>,
LKML <linux-kernel@...r.kernel.org>,
Hannes Frederic Sowa <hannes@...essinduktion.org>,
Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH 1/2] random: use chacha20 for get_random_int/long
On Fri, Jan 20, 2017 at 3:28 PM, Theodore Ts'o <tytso@....edu> wrote:
> Compare that to the fact that you're wasting up to 66% of the
> generated words in the batched entropy array, and certainly on average
> you're wasting CPU cycles, even if you are reducing the cost of
> calling get_random_u{32,64} by a handful of cycles....
What do you mean? Nothing is wasted right now. The u64 function only
gets u64s from a dedicated u64 array. The u32 function only gets u32s
from a dedicated u32 array. There are separate batched entropy arrays
for each function.
Perfect respect of alignment rules. Perfect cache line
characteristics. Most optimal instructions used. Zero bytes of entropy
wasted. Clean C code.
Unless I'm misunderstanding your emails, can you please give the
original patch another read?
Powered by blists - more mailing lists