All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Banks <gnb@sgi.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Linux NFS Mailing List <nfs@lists.sourceforge.net>
Subject: Re: Re: [PATCH] resend: knfsd multiple UDP sockets
Date: Tue, 8 Jun 2004 11:15:23 +1000	[thread overview]
Message-ID: <20040608011523.GB22272@sgi.com> (raw)
In-Reply-To: <16566.51874.43089.537506@cse.unsw.edu.au>

On Fri, May 28, 2004 at 03:14:10PM +1000, Neil Brown wrote:
> However if we could create a socket that was bound to an address only
> for sending and not for receiving, we could use a pool of such sockets
> for sending.
> This might be as easy as adding a "sk_norecv" field to struct sock,
> and skipping the sk->sk_prot->get_port call in inet_bind if it is set.
> Then all incoming requests would arrive on the one udp socket (there
> is very little contention between incoming packets on the one socket),
> and reply could go out one of the sk_norecv ports.
> 
> Does this make sense?  Would you be willing to try it?

In the last week I've looked at three options for bypassing the current
send limitation.

1.  Create multiple connected UDP sockets, and treat them just
    like connected TCP sockets, i.e. manage them in sv_tempsocks.

2.  Create a small pool of send-only sockets, as you describe.

3.  Use a single socket but reduce the time the svsk->sk_sem is
    held by building the datagram without the sem held and adding
    it to the write queue atomically.

It seems #2 is the easiest to implement.  #1 is next easiest but
would require either new hashing code in net/ipv4/udp.c or a logic
change to udp_v4_get_port(), neither of which appeal.  #3 is arguably
the right thing to do but is a very large chunk of work.

So I'm pursuing #2.  I think it can be done without touching the
UDP code.  More info when the patch gets some testing.


Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.


-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

      parent reply	other threads:[~2004-06-08  1:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-28  4:20 [PATCH] resend: knfsd multiple UDP sockets Greg Banks
2004-05-28  5:14 ` Neil Brown
2004-05-28  7:42   ` Greg Banks
2004-06-01 16:22   ` Eric Whiting
2004-06-01 23:19     ` Neil Brown
2004-06-02  0:47     ` Greg Banks
2004-06-08  1:15   ` Greg Banks [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=20040608011523.GB22272@sgi.com \
    --to=gnb@sgi.com \
    --cc=neilb@cse.unsw.edu.au \
    --cc=nfs@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.