Messages in this thread | | | From | "Jason A. Donenfeld" <> | Date | Fri, 4 Feb 2022 16:39:15 +0100 | Subject | Re: [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
| |