Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2006 17:38:07 +0800
From:      "Intron" <mag@intron.ac>
To:        mykola.stryebkov@gmail.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: VM question related to faults
Message-ID:  <courier.44CDCF7F.00018427@intron.ac>
In-Reply-To: <20060731085906.GA869@taran.infoua.com.ua>
References:  <20060730105731.GA64955@stud.fit.vutbr.cz> <20060730200354.GA82547@stud.fit.vutbr.cz> <courier.44CD9F44.00017212@intron.ac> <20060731085906.GA869@taran.infoua.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
mykola.stryebkov@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@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-
    ing.  

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

------------------------------------------------------------------------
                                                From Beijing, China




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?courier.44CDCF7F.00018427>