netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: Network Development <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	rds-devel@oss.oracle.com, santosh.shilimkar@oracle.com
Subject: Re: [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue
Date: Thu, 18 Jan 2018 06:02:07 -0500	[thread overview]
Message-ID: <20180118110207.GA24920@oracle.com> (raw)
In-Reply-To: <CAF=yD-KkL+rnSOvYMFKmeaJoD1zLj1mxtroccTNUJGrhm4SyKA@mail.gmail.com>

On (01/17/18 18:50), Willem de Bruijn wrote:
> 
> This can cause reordering with parallel readers. Can we avoid the need
> for peeking? It also caused a slew of subtle bugs previously.

Yes, I did notice the potential for re-ordering when writing the patch..
but these are not actuallly messages from the wire, so is re-ordering 
fatal?

In general, I"m not particularly attached to this solution- in my
testing, I'm seeing that it's possible to reduce the latency  and still
take a hit on the throughput if the application does not reap the
completion notifciation (and send out new data) efficiently

Some (radically differnt) alternatives that were suggested to me 

- send up all the cookies as ancillary data with recvmsg (i.e., send
  it as a cmsgdata along with actual data from the wire). In most
  cases, the application has data to read, anyway. If it doesnt (pure
  sender), we could wake up recvmsg with 0 bytes of data, but with
  the cookie info in the ancillary data. This feels not-so-elegant
  to me, but I suppose it would have the benefit of optimizing on
  the syscall overhead.. (and you could use MSG_CTRUNC to handle
  the case of insuufficient bufffer for cookies, sending the rest
  on the next call)..
- allow application to use a setsockopt on the rds socket, with
  some shmem region, into which the kernel could write the cookies,
  Let application reap cookies without syscall overhead from that
  shmem region..

> How about just define a max number of cookies and require the caller
> to always read with sufficient room to hold them?

This may be "good enough" as well, maybe allow a max of (say) 16 cookies,
and set up  the skb's in the error queue to send up batches of 16 cookies
at a time?

--Sowmini

  reply	other threads:[~2018-01-18 11:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 12:19 [PATCH RFC net-next 0/6] rds: zerocopy support Sowmini Varadhan
2018-01-17 12:19 ` [PATCH RFC net-next 1/6] sock: MSG_PEEK support for sk_error_queue Sowmini Varadhan
2018-01-17 23:50   ` Willem de Bruijn
2018-01-18 11:02     ` Sowmini Varadhan [this message]
2018-01-18 15:54       ` Eric Dumazet
2018-01-18 16:10         ` Sowmini Varadhan
2018-01-18 16:53           ` Eric Dumazet
2018-01-18 17:12             ` Sowmini Varadhan
2018-01-18 22:54               ` Willem de Bruijn
2018-01-18 23:03                 ` Sowmini Varadhan
2018-01-18 23:09                   ` Willem de Bruijn
2018-01-18 23:20                     ` Sowmini Varadhan
2018-01-18 23:24                       ` Willem de Bruijn
2018-01-18 15:51   ` Eric Dumazet
2018-01-17 12:20 ` [PATCH RFC net-next 2/6] skbuff: export mm_[un]account_pinned_pages for other modules Sowmini Varadhan
2018-01-17 12:20 ` [PATCH RFC net-next 3/6] rds: hold a sock ref from rds_message to the rds_sock Sowmini Varadhan
2018-01-17 12:20 ` [PATCH RFC net-next 4/6] sock: permit SO_ZEROCOPY on PF_RDS socket Sowmini Varadhan
2018-01-18  0:03   ` Willem de Bruijn
2018-01-17 12:20 ` [PATCH RFC net-next 5/6] rds: support for zcopy completion notification Sowmini Varadhan
2018-01-18  0:23   ` Willem de Bruijn
2018-01-18 11:40     ` Sowmini Varadhan
2018-01-18 22:46       ` Willem de Bruijn
2018-01-17 12:20 ` [PATCH RFC net-next 6/6] rds: zerocopy Tx support Sowmini Varadhan
2018-01-18  0:32   ` Willem de Bruijn

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=20180118110207.GA24920@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --cc=santosh.shilimkar@oracle.com \
    --cc=willemdebruijn.kernel@gmail.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;
as well as URLs for NNTP newsgroup(s).