VM question related to faults

Intron mag at intron.ac
Mon Jul 31 09:38:14 UTC 2006

mykola.stryebkov at gmail.com wrote:

> On 31.07.2006 14:12:20, Intron wrote:
>> Mutex(9) is sometimes too heavy, and has many limitations, while sx(9)
>> is somewhat enough.
> First paragraph from sx(9) manual says:
> 	Shared/exclusive locks are used to protect data that are read
> 	far more often than they are written.  Mutexes are inherently
> 	more efficient than shared/exclusive locks, so shared/exclusive
> 	locks should be used prudently.
> -- 
> Nick Strebkov
> Public key: http://humgat.org/~nick/pubkey.txt
> fpr: 552C 88D6 895B 6E64 F277 D367 8A70 8132 47F5 C1B6
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

But sx(9) also says in section "CONTEXT",

    A thread may hold a shared or exclusive lock on an sx lock while sleep-

You may try copyout() when holding a mutex(9) on 7.0-CURRENT.
Look out for kernel crash.

                                                From Beijing, China

More information about the freebsd-hackers mailing list