mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Andrew Morton <akpm@digeo.com>, Keith Mannthey <kmannth@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] clustered apic irq affinity fix for i386
Date: Wed, 30 Apr 2003 21:07:07 -0700	[thread overview]
Message-ID: <8940000.1051762026@[10.10.2.4]> (raw)
In-Reply-To: <20030430192205.13491d61.akpm@digeo.com>

>> This should be better. Thanks for the comments. 
> 
> Remind me again what the patch actually does?  It seems to be purely
> adding debug checks?
> 
> Won't it just go BUG if someone boots the kernel and then tries to
> manually set affinity?

Just ignoring the idiot caller would seem better, IMHO. BUG is a little
extreme ;-) Personally I'm happy for clustered apic mode machines with
irqbalance *disabled* to just fail the call. With it enabled, they can just
fraggle the affinity for irqbalance, and be happy.

> Seems a bit racy too. setup_ioapic_dest() does:
> 
>                         pending_irq_balance_apicid[irq] = mask;
>         ==> window here
>                         set_ioapic_affinity(irq, mask);
> 
> ioapic_lock is not held, so there is a window where
> pending_irq_balance_apicid[irq] can be set to some other value and
> io_apic_write_affinity() will accidentally go BUG.
> 
> 
> Is it not possible to fix set_ioapic_affinity() for real for clustered
> APIC mode?  What is involved in that?

The hardware doesn't support arbitrary cpumasks. However, as long as
we're running irqbalance, it doesn't matter  - we only do one cpu at a time
anyway.

The existing code in the mainline kernel is wrong for platforms other than
clustered apic mode too. irqbalance is happily rotating us one cpu at a
time, and then we go along and put our big masky foot in the thing, and
splat it across multiple CPUs. If irqbalance is on, all we need to do is
set up the irqbalance mask, then force a rebalance immediately.

M.


  parent reply	other threads:[~2003-05-01  3:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-30 23:07 Keith Mannthey
2003-04-30 23:36 ` Andrew Morton
2003-05-01  1:05   ` Keith Mannthey
2003-05-01  2:22     ` Andrew Morton
2003-05-01  2:49       ` William Lee Irwin III
2003-05-01  4:07       ` Martin J. Bligh [this message]
2003-05-01 17:51       ` Keith Mannthey
2003-05-06  0:04       ` [RFC][PATCH] fix for clusterd io_apics Keith Mannthey
2003-05-06 15:15         ` Martin J. Bligh
2003-05-01  9:10   ` [RFC] clustered apic irq affinity fix for i386 Arjan van de Ven

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='8940000.1051762026@[10.10.2.4]' \
    --to=mbligh@aracnet.com \
    --cc=akpm@digeo.com \
    --cc=kmannth@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®