softIRQ execution when CONFIG_PREEMPT is disabled

44 views
Skip to first unread message

Tony Mathew

unread,
Aug 14, 2023, 9:05:25 PM8/14/23
to inside...@googlegroups.com
Hi All,

If my linux kernel is configured with CONFIG_PREEMPT not mentioned or CONFIG_PREEMPT=n , can a softIRQ execution be preempted by hardIRQ?

Regards,
Tony

Anil Kumar Pugalia

unread,
Aug 15, 2023, 8:58:45 AM8/15/23
to inside...@googlegroups.com

By hardIRQ, if you mean hardware interrupts, they typically preempt everything else in the system, except few cases in RT mode.

Regards
Anil
Passion: https://sysplay.in (Playing with Systems)
Tony Mathew wrote on 15/08/23 6:35 am:
--
You received this message because you are subscribed to the Google Groups "SysPlay's Inside Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inside_linux...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inside_linux/CAAaR2_L3bQLD7YHhArRXZmDwL1bJsnOYgd83HFug9%2B-KSA2u3g%40mail.gmail.com.

Aijaz Baig

unread,
Aug 15, 2023, 11:03:13 AM8/15/23
to inside...@googlegroups.com
Maybe I'm mistaken, but don't softIRQs execute outside of process context but below hardware interrupt context? So essentially at the same privilege level of system calls?

How is that related to pre-emption? Can someone please clear it out to me?

Anil Kumar Pugalia

unread,
Aug 30, 2023, 2:59:03 AM8/30/23
to inside...@googlegroups.com

softIRQs are neither process context nor hardware interrupt context. They have their own context.

Regards
Anil
Passion: https://sysplay.in (Playing with Systems)
Aijaz Baig wrote on 15/08/23 8:32 pm:

Aijaz Baig

unread,
Aug 30, 2023, 3:33:02 AM8/30/23
to inside...@googlegroups.com
Can you expand on softIRQs  'having their own context'? 

On Linux I see each core having a kernel thread called 'ksoftirqd'. What's this one for?

Thanks for your help 

Anil Kumar Pugalia

unread,
Aug 30, 2023, 4:25:46 AM8/30/23
to inside...@googlegroups.com
Regards
Anil
Passion: https://sysplay.in (Playing with Systems)
Aijaz Baig wrote on 30/08/23 1:02 pm:
Reply all
Reply to author
Forward
0 new messages