Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Apr 2008 17:12:07 -0700
From:      Julian Elischer <julian@elischer.org>
To:        "Murty, Ravi" <ravi.murty@intel.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: md_spinlock_count?
Message-ID:  <480695D7.5050600@elischer.org>
In-Reply-To: <AEBCFC23C0E40949B10BA2C224FC61B006F81861@orsmsx416.amr.corp.intel.com>
References:  <AEBCFC23C0E40949B10BA2C224FC61B006F81861@orsmsx416.amr.corp.intel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Murty, Ravi wrote:
> Hello All,
> 
>  
> 
> 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.
> 
>  
> 
> 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? 

Which version/branch?
(and a filename and linenumber would be good too)
You might make it easy for us to answer you :-)

> 
>  
> 
> Thanks
> 
> Ravi Murty
> 
>  
> 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?480695D7.5050600>