> > The other thought that comes to mind is that you may need the old-style > > softirq until ksoftirqd is spawned. I doubt that real-time response is > > a big deal that early in boot. ;-) > > Puh. Given that the whole infrastructure is not prepared for that it is > probably more than a few lines plus a conditional jump in the IRQ > hot path. Also we do have scheduling at this point and IRQ-on/off works > which means possible dead locks because sleeping locks are acquired in > hard-IRQ context. This does need to work. But let me see what you have in the following paragraphs. > But let me summarize this: I did this: > > |@@ -1600,6 +1600,7 @@ static noinline void __init kernel_init_ > | > | rcu_init_tasks_generic(); > | do_pre_smp_initcalls(); > |+ rcu_tasks_initiate_self_tests(); > | lockup_detector_init(); > | > | smp_init(); > > To simply move the test from rcu_init_tasks_generic() to after > do_pre_smp_initcalls(). If we can't move rcu_init_tasks_generic() after > do_pre_smp_initcalls() or at least the test part because we need working > synchronize_rcu() in early_initcall() then I need to move the RT > requirements before. Simple ;) As long as RT confines itself to configurations that do not need a working synchronize_rcu() in the intervening code, yes, simple. ;-) > The requirements are: > > --- a/init/main.c > +++ b/init/main.c > @@ -1598,6 +1601,9 @@ static noinline void __init kernel_init_freeable(void) > > init_mm_internals(); > > + spawn_ksoftirqd(); > + irq_work_init_threads(); > + > rcu_init_tasks_generic(); > do_pre_smp_initcalls(); > lockup_detector_init(); > > spawn_ksoftirqd() is what I mentioned. What I just figured out is > irq_work_init_threads() due to > call_rcu_tasks_iw_wakeup() > > I can't move this to hard-IRQ context because it invokes wake_up() which > acquires sleeping locks. If you say that rtp->cbs_wq has only one waiter > and something like rcuwait_wait_event() / rcuwait_wake_up() would work > as well then call_rcu_tasks_iw_wakeup() could be lifter to hard-IRQ > context and we need to worry only about spawn_ksoftirqd() :) OK, I was expecting that the swait_event_timeout_exclusive() call from synchronize_rcu_expedited_wait_once() would be the problem. Are you saying that this swait_event_timeout_exclusive() works fine? Or are you instead saying that the call_rcu_tasks_iw_wakeup() issues cause trouble before that swait_event_timeout_exclusive() gets a chance to cause its own trouble? Either way, it sounds like that irq_work_queue(&rtpcp->rtp_irq_work) in call_rcu_tasks_generic() needs some adjustment to work in RT. This should be doable. Given this, and given that the corresponding diagnostic function rcu_tasks_verify_self_tests() is a late_initcall() function, you don't need to move the call to rcu_init_tasks_generic(), correct? Back over to you so that I can learn what I am still missing. ;-) Thanx, Paul