On 9/24/19 3:21 AM, Pavel Begunkov wrote: > On 24/09/2019 11:02, Jens Axboe wrote: >> On 9/24/19 1:06 AM, Pavel Begunkov wrote: >>> On 24/09/2019 02:00, Jens Axboe wrote: >>>>> I think we can do the same thing, just wrapping the waitqueue in a >>>>> structure with a count in it, on the stack. Got some flight time >>>>> coming up later today, let me try and cook up a patch. >>>> >>>> Totally untested, and sent out 5 min before departure... But something >>>> like this. >>> Hmm, reminds me my first version. Basically that's the same thing but >>> with macroses inlined. I wanted to make it reusable and self-contained, >>> though. >>> >>> If you don't think it could be useful in other places, sure, we could do >>> something like that. Is that so? >> >> I totally agree it could be useful in other places. Maybe formalized and >> used with wake_up_nr() instead of adding a new primitive? Haven't looked >> into that, I may be talking nonsense. > > @nr there is about number of tasks to wake up. AFAIK doesn't solve the > problem. Ah right, embarassingly I'm actually the one that added that functionality ages ago... -- Jens Axboe