Messages in this thread |  | | Date | Mon, 20 Dec 2021 13:56:56 +1100 | From | Herbert Xu <> | Subject | Re: [PATCH 5/5] random: Defer processing of randomness on PREEMPT_RT. |
| |
On Sun, Dec 19, 2021 at 10:48:12AM +0100, Sebastian Andrzej Siewior wrote: > > That one. I find the semantic difficult to understand. Some BH-user > check sock_owned_by_user(), some don't. > However, a semaphore should work. The atomic user would do > down_trylock() while preemptible caller would invoke down() and sleep > until the lock is available. Let me check if that works here…
Right, if your atomic user can simply discard the work then this is enough.
In the network case, we can't just discard the packet so that's why there is a backlog queue which the atomic user appends to if the lock isn't available.
Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|  |