Date: Wed, 16 Apr 2008 14:33:27 -0700 From: "Murty, Ravi" <ravi.murty@intel.com> To: <freebsd-hackers@freebsd.org> Subject: md_spinlock_count? Message-ID: <AEBCFC23C0E40949B10BA2C224FC61B006F81709@orsmsx416.amr.corp.intel.com>
next in thread | raw e-mail | index | archive | help
Hello All, =20 I was looking at the code that creates a new process (fork) with a single thread coming out on the other side. I can't figure out a couple of things. =20 1. Why is the md_spinlock_count for the new thread set to 1 and not to 0. This happens in cpu_fork and cpu_set_upcall under the amd64 tree. 2. If this was the "per-cpu" idle thread and the AP was booting up (running init_secondary) why does it grab sched_lock and call spinlock_exit. It would seem simpler to set the count of the idle thread to 0 and not have to call spinlock_exit. The only answer I can come up with is the fact that a non-zero spinlock_count prevents interrupts from getting disabled/renabled to some unknown value? =20 Thanks Ravi Murty
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AEBCFC23C0E40949B10BA2C224FC61B006F81709>