All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyanskiy <maxk@qualcomm.com>
To: Paul Jackson <pj@sgi.com>
Cc: a.p.zijlstra@chello.nl, menage@google.com, mingo@elte.hu,
	linux-kernel@vger.kernel.org
Subject: Re: IRQ affinities
Date: Wed, 21 May 2008 10:58:09 -0700	[thread overview]
Message-ID: <483462B1.6050501@qualcomm.com> (raw)
In-Reply-To: <20080521013424.6600780a.pj@sgi.com>

Hi Paul,

Paul Jackson wrote:
> Max wrote:
>> What I realized now is that all I need is
>> /proc/irq/default_smp_affinity.
> 
> I suspect that something like you're proposing to do here will answer
> your needs, to "tell the kernel to not route IRQs to certain CPUs."
> 
> I suspect that other folks will have some additional needs, that perhaps
> my idea of May 9, 2008:
> 
>        How about this.  We add two files to each cpuset:
>        
>            irq_affinity_include	# IRQs to direct to CPUs in this cpuset
>            irq_affinity_exclude	# IRQs -not- to direct to these CPUs
>        
>        where irq_affinity_exclude overrides irq_affinity_include.
> 
> could meet.

I saw your earlier email with that proposal. Just had to digest it a bit :) 
(still catching up with things after vacation).

> So, to determine to which CPUs a given interrupt (IRQ) can be directed:
>  1) Combine (union) the 'cpus' of all the cpusets for which
>     that IRQ is in that cpusets irq_affinity_include, then
>  2) Remove (set substraction) the 'cpus' of any cpuset for which
>     that IRQ is in that cpusets irq_affinity_exclude.

That would work. But wouldn't it be hard for the users to debug things ? I 
mean if you have a complex cpuset hierarchy it may be hard to figure out why a 
certain irq is not getting to cpuX and vice versa.
btw How would we represent "all irqs", are you implying that those files 
contain masks ?
We'll also need to handle conflicts like "irq excluded from all cpusets", etc.
I still prefer "irq as a task" approach. It's very simple and straightforward 
  mapping of an irq -> cpuset, no conflicts, etc. Easy to figure out for the 
user where an irq will end up.

btw I did not quite get the idea behind the "exclude" part. Why is "include" 
not enough ? Can you give me an example.

> It makes sense to me to deal with your "default_smp_affinity" patch
> first, and then come back around and see what remains to be done, and
> how to do it, perhaps with additional cpuset based mechanisms such as
> the above two irq_affinity_* IRQ masks.
> 
>> I'm in the process of making a patch for exposing default affinity mask.
> 
> Peter, et al: how does Max's planned "default_smp_affinity" patch sound
> to you, as the next step we take on this?

I think it makes sense regardless of the cpuset based approach. Seems like a 
logical extension of the existing interface (ie per IRQ mask plus the default).

Max



  reply	other threads:[~2008-05-21 17:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12  1:23 boot cgroup questions Max Krasnyansky
2008-03-12  1:27 ` Paul Menage
2008-03-12  2:34   ` Max Krasnyansky
2008-03-12  2:36     ` Paul Menage
2008-03-12  2:53       ` Max Krasnyansky
2008-03-12  3:09         ` Paul Menage
2008-03-12  3:39           ` Max Krasnyansky
2008-03-12  4:59           ` Paul Jackson
2008-03-12 18:24             ` Max Krasnyanskiy
2008-03-12 18:57               ` Paul Jackson
2008-03-12 19:11                 ` Max Krasnyanskiy
2008-03-12 19:32                   ` Paul Jackson
2008-03-12 20:08                     ` Max Krasnyanskiy
2008-03-12 20:37                       ` Paul Jackson
2008-03-12 22:29                         ` Max Krasnyanskiy
2008-03-12 23:30                           ` Paul Jackson
2008-03-13  0:57                             ` Max Krasnyanskiy
2008-03-13  7:03                               ` Paul Jackson
2008-04-10 18:03                                 ` Max Krasnyanskiy
2008-04-14 18:39                                   ` Paul Jackson
2008-05-09 10:45                                     ` Peter Zijlstra
2008-05-09 11:17                                       ` IRQ affinities (was: boot cgroup questions) Paul Jackson
2008-05-09 11:48                                         ` Peter Zijlstra
2008-05-09 12:03                                           ` Paul Jackson
2008-05-09 12:14                                             ` Peter Zijlstra
2008-05-09 12:36                                               ` Paul Jackson
2008-05-09 17:43                                                 ` Paul Jackson
2008-05-21  1:21                                                 ` IRQ affinities Max Krasnyanskiy
2008-05-21  1:14                                         ` Max Krasnyanskiy
2008-05-21  4:45                                           ` Arjan van de Ven
2008-05-21 16:18                                             ` Max Krasnyanskiy
2008-05-21  6:34                                           ` Paul Jackson
2008-05-21 17:58                                             ` Max Krasnyanskiy [this message]
2008-04-14 18:42                                   ` boot cgroup questions Paul Jackson
2008-03-13  7:12                               ` Paul Jackson
2008-04-10 17:24                                 ` Max Krasnyanskiy
2008-04-10 17:37                                   ` Paul Jackson
2008-03-12 23:32                           ` Paul Jackson
2008-03-13  0:46                             ` Max Krasnyanskiy
2008-03-12 19:16             ` Paul Menage
2008-03-12 19:24               ` Paul Jackson
2008-03-12 19:30                 ` Max Krasnyanskiy

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=483462B1.6050501@qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.