mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "David S. Miller" <davem@redhat.com>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	NFS devel <nfs-devel@linux.kernel.org>
Subject: Re: Spinlocking patch for in xprt.c
Date: 14 Jan 2001 19:45:20 +0100	[thread overview]
Message-ID: <shs1yu60y7z.fsf@charged.uio.no> (raw)
In-Reply-To: <14942.64595.157544.350302@charged.uio.no> <14944.57417.917410.380225@pizda.ninka.net>
In-Reply-To: "David S. Miller"'s message of "Sat, 13 Jan 2001 15:10:01 -0800 (PST)"

>>>>> " " == 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/

      reply	other threads:[~2001-01-14 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-12 12:45 Trond Myklebust
2001-01-13 23:10 ` David S. Miller
2001-01-14 18:45   ` Trond Myklebust [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=shs1yu60y7z.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs-devel@linux.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®