public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [docs] /proc/irq/
@ 2013-01-30  9:44 Oleg
  2013-02-04 15:06 ` Rob Landley
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg @ 2013-01-30  9:44 UTC (permalink / raw)
  To: linux-kernel

  Hello.

  Where can i find an info about /proc/irq/*/affinity_hint ?
  Documentation/filesystems/proc.txt says nothing about it (3.2.37 kernel).

  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [docs] /proc/irq/
  2013-01-30  9:44 [docs] /proc/irq/ Oleg
@ 2013-02-04 15:06 ` Rob Landley
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Landley @ 2013-02-04 15:06 UTC (permalink / raw)
  To: Oleg; +Cc: linux-kernel

On 01/30/2013 03:44:32 AM, Oleg wrote:
>   Hello.
> 
>   Where can i find an info about /proc/irq/*/affinity_hint ?
>   Documentation/filesystems/proc.txt says nothing about it (3.2.37  
> kernel).

The general procedure is to look for the git commit, which may have a  
good commit comment, and also gives you an idea when it went in so you  
can look in the mailing list archives:

cd linux
find . -name '"affinity_hint"'
git annotate kernel/proc/irq.c
(search for "affinity_hint" in quotes, line 331 here, the bit on the  
left edge is the commit hash.)

commit e7a297b0d7d6049bd4e423ac1e17da31e4c401b8
Author: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Date:   Fri Apr 30 14:44:50 2010 -0700

     genirq: Add CPU mask affinity hint

     This patch adds a cpumask affinity hint to the irq_desc structure,
     along with a registration function and a read-only proc entry for  
each
     interrupt.

     This affinity_hint handle for each interrupt can be used by  
underlying
     drivers that need a better mechanism to control interrupt affinity.
     The underlying driver can register a cpumask for the interrupt,  
which
     will allow the driver to provide the CPU mask for the interrupt to
     anything that requests it.  The intent is to extend the userspace
     daemon, irqbalance, to help hint to it a preferred CPU mask to  
balance
     the interrupt into.

     [ tglx: Fixed compile warnings, added WARN_ON, made SMP only ]

     Signed-off-by: Peter P Waskiewicz Jr  
<peter.p.waskiewicz.jr@intel.com>

That doesn't clarifiy much. Grepping the source for irq_affinity it  
looks like the kernel treats this as a write-only property, and never  
does anything with the info. However, include/linux/irqdesc.h has  
documentation for the structure containing the property, and it says  
this about that field:

  * @affinity_hint:      hint to user space for preferred irq affinity

So this "irqbalance" daemon you're probably not running (unless it got  
sucked into the systemd hairball, in which case you don't know you're  
running it and can't stop it) reads this process and tells the kernel  
to move the irq worker thread to this CPU while load balancing.

It sounds like you're saying Documentation/filesystems/proc.txt should  
be updated to include this information?

Rob

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-04 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30  9:44 [docs] /proc/irq/ Oleg
2013-02-04 15:06 ` Rob Landley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox