mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@linuxpower.ca>
To: Maciej <maciej@apathy.killer-robot.net>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	William Lee Irwin III <wli@holomorphy.com>
Subject: [PATCH][2.6] i386 /proc/irq/.../smp_affinity
Date: Wed, 10 Sep 2003 21:55:03 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0309101535050.9323@montezuma.fsmlabs.com> (raw)
In-Reply-To: <20030910191459.GA12099@apathy.black-flower>

On Wed, 10 Sep 2003, Maciej wrote:

> Since I upgraded from 2.6.0-test3, to 2.6.0-test5, I can't seem to
> get the SMP irq affinity to change. I have a dual-proc PII-333 with
> a 440LX chipset. On boot, the smp_affinity mask for each interrupt
> is set to 00030000, and setting it to ffffffff doesn't change
> anything.

That number looks highly suspect; see patch below

> The interrupts on IRQ5/CPU1 arrive in bursts. All interrupts for IRQ5
> will happen on CPU0 for an extended period, but after I leave the
> thing alone for a few hours, I'll find that the count for CPU1 will
> have increased by a few tens of thousands. The counts for CPU1 on irq
> 0 and irq 9 are set this way as soon as I have a chance to log in,
> and don't change afterwards.

Do you have the irqbalanced daemon running? You could also try booting 
with the 'noirqbalance' kernel parameter.

Index: linux-2.6.0-test5/arch/i386/kernel/irq.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test5/arch/i386/kernel/irq.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 irq.c
--- linux-2.6.0-test5/arch/i386/kernel/irq.c	8 Sep 2003 22:07:35 -0000	1.1.1.1
+++ linux-2.6.0-test5/arch/i386/kernel/irq.c	11 Sep 2003 01:36:11 -0000
@@ -938,21 +938,12 @@ cpumask_t irq_affinity[NR_IRQS] = { [0 .
 static int irq_affinity_read_proc(char *page, char **start, off_t off,
 			int count, int *eof, void *data)
 {
-	int k, len;
 	cpumask_t tmp = irq_affinity[(long)data];
 
 	if (count < HEX_DIGITS+1)
 		return -EINVAL;
 
-	len = 0;
-	for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-		int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
-		len += j;
-		page += j;
-		cpus_shift_right(tmp, tmp, 16);
-	}
-	len += sprintf(page, "\n");
-	return len;
+	return sprintf(page, "%08x\n", (u32)cpus_coerce(tmp));
 }
 
 static int irq_affinity_write_proc(struct file *file, const char __user *buffer,

  reply	other threads:[~2003-09-11  1:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10 19:14 No IRQ balancing in 2.6.0-test5 Maciej
2003-09-11  1:55 ` Zwane Mwaikambo [this message]
2003-09-11  2:02   ` [PATCH][2.6] i386 /proc/irq/.../smp_affinity William Lee Irwin III
2003-09-11  2:07     ` Zwane Mwaikambo
2003-09-11  2:21       ` William Lee Irwin III
2003-09-11  7:06   ` William Lee Irwin III
2003-09-11 17:43   ` Maciej Babinski
2003-09-11 21:43     ` Zwane Mwaikambo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0309101535050.9323@montezuma.fsmlabs.com \
    --to=zwane@linuxpower.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej@apathy.killer-robot.net \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®