+ spinlock_debug-dont-recompute-jiffies_per_loop.patch added to -mm tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Andrew Morton
The patch titled
spinlock_debug: don't recompute (jiffies_per_loopapplied-patches arch backup bin block config-x COPYING CREDITS CREDITS~git-gfs2 crypto CVS Documentation drivers fs include init ipcKbuildkernel lib linus-series log machMAINTAINERSMAINTAINERS~avr32-arch MAINTAINERS~edac-new-opteron-athlon64-memory-controller-driver MAINTAINERS~git-gfs2 MAINTAINERS~git-klibc MAINTAINERS.orig MAINTAINERS~origin MAINTAINERS~qla3xxx-NIC-driver MAINTAINERS~x86_64-mm-add-a-maintainers-entry-for-calgaryMakefileMakefile~git-kbuild Makefile~git-klibc Makefile~mm Makefile.orig Makefile.rej mm net notes patches pc README REPORTING-BUGS scripts security series 'series sound Tags test.img txt usr HZ) in spinloophas been added to the -mm tree. Its filename is
Wow, that's umm, spectacular ;-)
Quoted 8 lines
------------------------------------------------------
Subject:spinlock_debug: don't recompute (jiffies_per_loopapplied-patches arch backup bin block config-x COPYING CREDITS CREDITS~git-gfs2 crypto CVS Documentation drivers fs include init ipcKbuildkernel lib linus-series log machMAINTAINERSMAINTAINERS~avr32-arch MAINTAINERS~edac-new-opteron-athlon64-memory-controller-driver MAINTAINERS~git-gfs2 MAINTAINERS~git-klibc MAINTAINERS.orig MAINTAINERS~origin MAINTAINERS~qla3xxx-NIC-driver MAINTAINERS~x86_64-mm-add-a-maintainers-entry-for-calgaryMakefileMakefile~git-kbuild Makefile~git-klibc Makefile~mm Makefile.orig Makefile.rej mm net notes patches pc README REPORTING-BUGS scripts security series 'series sound Tags test.img txt usr HZ) in spinloop
From: Chuck Ebbert <[email protected]>In
spinlock_debug.c, the spinloops call__delay()on every iteration. Because that is an external function, (jiffies_per_loop* HZ), the loop's iteration limit, gets recomputed every time. Caching it explicitly prevents that.
What is the purpose of those __delays being there at all ? Seems odd to be waiting that long when the spinlock could become available a lot sooner. (These also make spinlock debug really painful on boxes with huge numbers of CPUs).
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 7 lines · Dave Jones
Quoted 2 lines
iteration limit, gets recomputed every time. Caching it explicitly prevents that.
What is the purpose of those
__delaysbeing there at all ? Seems odd to be waiting that long when the spinlock could become available a lot sooner. (These also make spinlock debug really painful on boxes with huge numbers of CPUs).
the debug code has to figure out when to trigger a deadlock warning message. If we are looping in a deadlock with irqs disabled on all CPUs, there's nothing that advances jiffies. The TSC is not reliable. The thing that remains is to use __delay(1). We could calibrate the loop separately perhaps?
Ingo