lkml.org 
[lkml]   [2001]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Spinlocking patch for in xprt.c
From
Date
>>>>> " " == David S Miller <davem@redhat.com> writes:

> Trond, did you actually look at how this code works before you
> made modifications to my fixes?

> xprt_lock serializes sleep/wakeup sequences in the xprt code,
> so you cannot remove xprt_lock from the sections where I added
> holding of xprt_sock_lock to protect the state of
> xprt->snd_task. So for example, this part of your patch is
> completely bogus and will create new corruptions and crashes:

IIRC xprt_lock is there for 2 purposes:

- serialize access to the TCP connect code
- gate access to the *socket* via the xprt_(up|down)_transmit() (and
hence setting xprt->snd_task which is a pointer to the task that
currently is allowed to access the socket.)

Those 2 tasks are completely orthogonal to one another, so we should
be quite free to drop xprt_lock in the second case.

I can see no other places where we're using xprt_lock to protect a
sleep/wakeup of xprt->snd_task unless you're introducing it? If so for
what purpose?

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

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.038 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site