Re: [REGRESSION] jump label safety checks break automatic numa balancing

From: Raghavendra KT
Date: Tue Oct 08 2013 - 06:33:51 EST


On Fri, Oct 4, 2013 at 8:33 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
CCing my IBM id
> >
> > Bisection identified this as the problem commit.
> >
> > 9c85f3bdf400665eecf62658a9106501f6a77a13 is the first bad commit
> > commit 9c85f3bdf400665eecf62658a9106501f6a77a13
> > Author: Steven Rostedt <srostedt@xxxxxxxxxx>
> > Date: Thu Jan 26 18:38:07 2012 -0500
> >
> > x86/jump-label: Add safety checks to jump label conversions
> >
> > I did no further investigation yet in case this is already a known
> > problem.
> >
>
> We had a similar bug with Xen like this. It ended up being that jump
> labels are used before they are initialized, and that is a real bug
> too, as the jump labels do not get converted until initialization, and
> why would something convert it before then?

Just FYI,

I also faced KVM hang with CONFIG_PARAVIRT_SPINLOCK=y that uses jump label

The bisection lead to:

# good: [8d7551eb1916832f2a5b27346edf24e7b2382f67] Merge tag
'cris-for-3.12' of git://jni.nu/cris
git bisect good 8d7551eb1916832f2a5b27346edf24e7b2382f67
# good: [fb40d7a8994a3cc7a1e1c1f3258ea8662a366916] x86/jump-label:
Show where and what was wrong on errors
git bisect good fb40d7a8994a3cc7a1e1c1f3258ea8662a366916
# good: [8876dd78d9f0cd317d55dc19e5cd17194af15b52] hwmon: (ina2xx)
Remove casting the return value which is a void pointer
git bisect good 8876dd78d9f0cd317d55dc19e5cd17194af15b52
# bad: [442e0973e9273ae8832abd70f52efde8b8326178] Merge branch
'x86/jumplabel' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 442e0973e9273ae8832abd70f52efde8b8326178

I got confirmed that reverting three hunks from the jump label merge
solved the problem.
Disabling jump label resulted in eventual halt of all the VCPUs when
we use paravirt spinlock.
But I think exact fix is to split kvm_guest_spinlock_init similar to
what Xen did.

I am testing the fix and will post that soon.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/