lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC 4/6] softirq: Run per-group per-cpu ksoftirqd thread
From
Date
On Thu, 2018-01-18 at 17:53 +0000, Dmitry Safonov wrote:
> How do you identify in RT one ksoftirqd thread from
> another? I mean, to find which softirq nr the thread is servicing?

static void do_raise_softirq_irqoff(unsigned int nr)
{
struct task_struct *tsk = __this_cpu_ksoftirqd(nr);
unsigned int mask = 1UL << nr;

trace_softirq_raise(nr);
or_softirq_pending(mask);

/*
* If we are not in a hard interrupt and inside a bh disabled
* region, we simply raise the flag on current. local_bh_enable()
* will make sure that the softirq is executed. Otherwise we
* delegate it to the proper softirqd thread for this softirq.
*/
if (!in_irq() && current->softirq_nestcnt) {
if (!(current->flags & PF_KSOFTIRQD) || current == tsk)
current->softirqs_raised |= mask;
else if (tsk) {
tsk->softirqs_raised |= mask;
wakeup_softirqd(nr);
}
} else if (tsk)
tsk->softirqs_raised |= mask;
}

\
 
 \ /
  Last update: 2018-01-18 19:29    [W:0.046 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site