lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1516300112.7351.17.camel@gmx.de>
Date:   Thu, 18 Jan 2018 19:28:32 +0100
From:   Mike Galbraith <efault@....de>
To:     Dmitry Safonov <dima@...sta.com>, linux-kernel@...r.kernel.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        David Miller <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Hannes Frederic Sowa <hannes@...essinduktion.org>,
        Ingo Molnar <mingo@...nel.org>,
        "Levin, Alexander (Sasha Levin)" <alexander.levin@...izon.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Mauro Carvalho Chehab <mchehab@...pensource.com>,
        Paolo Abeni <pabeni@...hat.com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Radu Rendec <rrendec@...sta.com>,
        Rik van Riel <riel@...hat.com>,
        Stanislaw Gruszka <sgruszka@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [RFC 4/6] softirq: Run per-group per-cpu ksoftirqd thread

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;
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ