Re: [PATCH][2.3.0] Read-write locks instead semaphores on UTS structures

Jan-Simon Pendry (jsp@ms.com)
Thu, 13 May 1999 18:12:15 +0100


Marcelo Tosatti wrote:
>
> This patch implements read-write locks instead semaphores in UTS
> structures as noted by Linus in kernel/sys.c.
>
> Linus, can you apply this?
>
> - Marcelo
>
> ------------------------------------------------------------------------
> Name: uts-rwlock.patch
> uts-rwlock.patch Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64

i don't think you want to be holding spin-locks across
a put_user/copy_from_user etc. put_user et al can page
fault and go to sleep holding the spin lock. this can
then deadlock the system if other processes comes along
and contend for the same lock. if you are desperate for
parallel performance in this area you will need to implement
reader-writer semaphores.

jan-simon.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/