lkml.org 
[lkml]   [2022]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] random: remove batched entropy locking
Hi Sebastian,

On Fri, Feb 4, 2022 at 3:30 PM Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
> > What if we keep a spinlock_t there on PREEMPT_RT but stick with
> > disabling interrupts on !PREEMPT_RT? I wish there was a solution or an
> > API that amounted to the same thing so there wouldn't need to be an
> > #ifdef, but I don't know what that'd be.
>
> If it is still to much try to look for locallock_t and
> local_lock_irqsave(). This is kind of like your local_irq_save() but
> you have lockdep annotations and PREEMPT_RT has a spinlock_t like
> behaviour. It also documents in-code what the scope of your locking is.

Oh, that's terrific, thanks! Sounds like exactly what we were looking
for. I'll respin this patch with that.

Jason

\
 
 \ /
  Last update: 2022-02-04 16:40    [W:0.099 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site