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-next>] [day] [month] [year] [list]
Message-ID: <CAFQPvXeVZ858WFYimEU5uvLNxLDd6bJMmqWihFmbCf3ntokz0A@mail.gmail.com>
Date:	Wed, 31 Oct 2012 15:41:23 -0500
From:	Sankara Muthukrishnan <sankara.m@...il.com>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	linux-rt-users <linux-rt-users@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: [PATCH 1/1] irq: Set CPU affinity soon after irq thread is created

From: Sankara S Muthukrishnan <sankara.m@...com>

As irq_thread_check_affinity is called ONLY inside the while loop in the
irq thread, the core affinity is set only when an interrupt occurs.
This patch sets the core affinity soon after the irq thread is created
and before it waits for interrupts. In real-tiime targets that do not
typically change the core affinity of irqs during run-time, this patch
will save additional latency of an irq thread in setting the core
affinity during the first interrupt occurrence for that irq.

Signed-off-by: Sankara S Muthukrishnan <sankara.m@...com>
Acked-by: Steven Rostedt <rostedt@...dmis.org>
---
Hi Thomas,

As we discussed in the original thread
http://marc.info/?l=linux-kernel&m=134987001701683&w=2 , I am sending
this patch against the current mainline.

 kernel/irq/manage.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 4c69326..020b535 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -833,6 +833,8 @@ static int irq_thread(void *data)
 	init_task_work(&on_exit_work, irq_thread_dtor);
 	task_work_add(current, &on_exit_work, false);

+	irq_thread_check_affinity(desc, action);
+
 	while (!irq_wait_for_interrupt(action)) {
 		irqreturn_t action_ret;

-- 
1.7.11.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ