Messages in this thread | | | Date | Wed, 28 Sep 2022 13:37:52 +0200 | From | Sebastian Andrzej Siewior <> | Subject | Re: [PATCH] random: avoid reading two cache lines on irq randomness |
| |
On 2022-09-23 20:28:49 [+0200], Jason A. Donenfeld wrote: > In order to avoid reading and dirtying two cache lines on every IRQ, move > the work_struct to the bottom of the fast_pool struct. add_interrupt_ > randomness() always touches .pool and .count, which are currently split, > because .mix pushes everything down. Instead, move .mix to the bottom, > so that .pool and .count are always in the first cache line, since the > .mix is only accessed when the pool is full. > > Fixes: 58340f8e952b ("random: defer fast pool mixing to worker") > Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > Cc: Sultan Alsawaf <sultan@kerneltoast.com> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Yup, makes sense.
Sebastian
| |