All of lore.kernel.org
 help / color / mirror / Atom feed
* "irq 4: Affinity broken due to vector space exhaustion." warning on restart of ttyS0 console
@ 2020-11-10 19:24 Prarit Bhargava
  2020-11-10 20:56 ` Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: Prarit Bhargava @ 2020-11-10 19:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
	H. Peter Anvin, Marc Zyngier, Andy Lutomirski, Ming Lei,
	Peter Xu

Occasionally when logging out of the ttyS0 aka serial console I see that

	irq 4: Affinity broken due to vector space exhaustion.

is output to the console.

At boot the default smp_affinity is

/proc/irq/4/smp_affinity:000000ff,ffff0000,00ffffff

The irqbalance service runs and can change this value.  Depending on system load
and behaviour, the IRQ can be assigned to a cpu on socket 1 and the smp_affinity
is changed to socket 1.  In that case,

/proc/irq/4/smp_affinity:ffffff00,0000ffff,ff000000

When the user logs out of the serial console, the console is shut down and IRQ
is free'd.  The IRQ is immediately reacquired by the serial console when it
starts up again.

For example,

Red Hat Enterprise Linux 8.4 Beta (Ootpa)
Kernel 5.10.0-rc2+ on an x86_64

HOSTNAME: intel-whitley-07.khw1.lab.eng.bos.redhat.com
Activate the web console with: systemctl enable --now cockpit.socket

intel-whitley-07 login: root
Password:

Last login: Mon Nov  9 19:13:33 on ttyS0
[07:25 PM root@intel-whitley-07 ~]# exit

*** console shutdown, IRQ released for cpu on socket 1
*** console starts back up again, IRQ assigned to on cpu on socket 0

In this process, however, the smp_affinity is not cleared for IRQ4.  That is, it
remains as

/proc/irq/4/smp_affinity:ffffff00,0000ffff,ff000000

so that the check in activate_reserved() fails and

"irq 4: Affinity broken due to vector space exhaustion."

is output to the screen.

I am not sure of correct fix here.  It looks like the smp_affinity should be
reset to default at irq shutdown, however, I cannot determine if that should be
done for every IRQ, or (hopefully not) per driver.

Can anyone offer guidance on a fix?

P.


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

end of thread, other threads:[~2020-12-10  6:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 19:24 "irq 4: Affinity broken due to vector space exhaustion." warning on restart of ttyS0 console Prarit Bhargava
2020-11-10 20:56 ` Thomas Gleixner
2020-11-11 16:14   ` Prarit Bhargava
2020-12-09  6:33   ` Shung-Hsi Yu
2020-12-09  7:10     ` Shung-Hsi Yu
2020-12-09 18:28     ` Thomas Gleixner
2020-12-10  6:18       ` Shung-Hsi Yu

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.