Date: Sun, 9 Nov 2003 21:12:56 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: smp@freebsd.org Subject: foot-shooting using wrong pcpu Message-ID: <20031109204643.J2752@gamplex.bde.org>
next in thread | raw e-mail | index | archive | help
Does anyone have any experience with the pcpu sometimes being for the wrong cpu on i386's? I have a local locking bug which seems to cause this. The usual symptoms are that curpmap is sometimes 0 in cpu_switch(), and cpu_switch() sometimes switches cpuN to run cpuM's idle thread for M != N (this sometimes appears to work for a few switches but eventually the stacks trash each other). Problems in cpu_switch() seem to be more symptoms than causes. I can't see how either the pcpu selector or the pcpu GDT entry could get trashed (aren't these almost constant after booting? All lgdt's are early, and %fs is always KPSEL in the kernel except in the TLB shootdown IPI with default (?) options). I mostly look at pcu data in SMPprvspace since %fs is hard to use and "show pcpu" doesn't show enough, and everything in SMPprvspace seems reasonable except curpmap is sometimes 0. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031109204643.J2752>