lkml.org 
[lkml]   [1997]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Socket locking
From
Date
Bill Hawes <whawes@star.net> writes:

> Alan Cox wrote:
> > Is the inode semaphore interrupt safe ?
>
> It's a MUTEX, so it's supposed to be interrupt safe. On the other hand,
> we probably don't want code running in an interrupt context to be
> blocked by a semaphore. This may make it tricky to determine what uses
> should be protected by the semaphore ..

I think that's no problem. The only interrupt involved in packet output
is the timer - and it only does:

if (sk->sock_readers) wait another second
This could just be replaced with

if (sk->sock_readers || sem_trylock(inode->i_sem))
wait another second
For input processing it's different, for this sock_readers is good.

-Andi


\
 
 \ /
  Last update: 2005-03-22 13:40    [from the cache]
©2003-2011 Jasper Spaans