Irqbalance / irqbalance

The irqbalance source tree - The new official site for irqbalance

Home Page:http://irqbalance.github.io/irqbalance/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[question] `irqbalance --policyscript` with directory exit-code behavior difference?

BrendanCunningham opened this issue · comments

The irqbalance.1 manpage source has this to say about how irqbalance behaves on policyscript exit codes when --policyscript specifies a directory and not an individual script file:

Note that, if a directory is specified rather than a regular file, all files in
the directory will be considered policy scripts, and executed on adding of an
irq to a database.  If such a directory is specified, scripts in the directory
must additionally exit with one of the following exit codes:
.TP
.I 0
This indicates the script has a policy for the referenced irq, and that further
script processing should stop
.TP
.I 1
This indicates that the script has no policy for the referenced irq, and that
script processing should continue
.TP
.I 2
This indicates that an error has occurred in the script, and it should be skipped
(further processing to continue)

For the exit 2 case, what is the "it" in "it should be skipped"?:

  • The policy script for all other/future IRQs detected/rescanned
  • The IRQ number
  • The combination of (policy script, IRQ number)
  • Something else
    ?

The combination of (policy script, IRQ number) will be skipped.
For details, see the get_irq_user_policy function in classify.c.

Correct,.the it refers to the processing of that irq with that policy script. In other words, any output that the script provided regarding balancing policy for the passed in irq prior to the script exiting with a code of 2 will be ignored by irqbalance

@nhorman @liuchao173 Thanks; and in the case of exit 1 when --policyscript points to a directory of scripts, that (policy script, IRQ number) combination may be considered again on a rescan?

correct