All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Maloy <jon.maloy@ericsson.com>
To: David Miller <davem@davemloft.net>,
	"viro@ZenIV.linux.org.uk" <viro@ZenIV.linux.org.uk>
Cc: "hch@lst.de" <hch@lst.de>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH] net: remove sock_iocb
Date: Thu, 29 Jan 2015 12:13:46 +0000	[thread overview]
Message-ID: <A2BAEFC30C8FD34388F02C9B3121859D1C3687B8@eusaamb103.ericsson.se> (raw)
In-Reply-To: <20150129.000125.1532086382063848714.davem@davemloft.net>



> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of David Miller
> Sent: January-29-15 3:01 AM
> To: viro@ZenIV.linux.org.uk
> Cc: hch@lst.de; netdev@vger.kernel.org
> Subject: Re: [PATCH] net: remove sock_iocb
> 
> From: Al Viro <viro@ZenIV.linux.org.uk>
> Date: Thu, 29 Jan 2015 07:57:21 +0000
> 
> > You know, that's getting _really_ interesting.  The thing is, now
> > there's only one ->sendmsg() instance using iocb argument at all, and
> > it's a really weird one.  TIPC.  Which only compares it with NULL, and
> > that - to tell the normal calls (== done by sock_sendmsg()
> > et.al.) from tipc_{accept,connect}()-generated ones.  And the way it's
> > used is
> >         if (iocb)
> >                 lock_sock(sk);
> > in tipc_send_stream().  IOW, "tipc_accept() and tipc_connect() would
> > like to use the guts of tipc_send_stream(), but they are already
> > holding the socket locked; let's just pass NULL iocb (which
> > net/socket.c never does) to tell it to leave the fucking lock alone, thank you
> very much".
> >
> > And no ->recvmsg() are using iocb at all now.  How about we take the
> > guts of tipc_send_stream() into a helper function and have
> > tipc_accept/connect use _that_? 

Sounds reasonable. We'll look into this.

///jon

 Then we could drop iocb argument
> > completely and for ->sendmsg() it would be the difference between 4
> > and 3 arguments, which has interesting effects on certain register-starved
> architectures...
> >
> > While we are at it, size (both for sendmsg and recvmsg) is always
> > equal to iov_iter_count(&msg->msg_iter), so that's not the only
> > redundant argument there...
> 
> No objections from me.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in the body
> of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-01-29 12:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 17:04 [PATCH] net: remove sock_iocb Christoph Hellwig
2015-01-29  7:22 ` David Miller
2015-01-29  7:57   ` Al Viro
2015-01-29  8:01     ` David Miller
2015-01-29 12:13       ` Jon Maloy [this message]
2015-02-04  7:29     ` Ying Xue

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=A2BAEFC30C8FD34388F02C9B3121859D1C3687B8@eusaamb103.ericsson.se \
    --to=jon.maloy@ericsson.com \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=netdev@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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.