From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:47640 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbeBUXE1 (ORCPT ); Wed, 21 Feb 2018 18:04:27 -0500 Date: Wed, 21 Feb 2018 18:03:55 -0500 From: Sowmini Varadhan To: Willem de Bruijn Cc: Network Development , David Miller , rds-devel@oss.oracle.com, Santosh Shilimkar Subject: Re: [PATCH net-next] RDS: deliver zerocopy completion notification with data as an optimization Message-ID: <20180221230355.GH15244@oracle.com> References: <1519244381-138747-1-git-send-email-sowmini.varadhan@oracle.com> <20180221221428.GG15244@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On (02/21/18 17:50), Willem de Bruijn wrote: > > In the common case no more than one notification will be outstanding, > but with a fixed number of notifications per packet, in edge cases this > list may be long. : > Socket functions block if sk_err is non-zero. See for instance > tcp_sendmsg_locked. It is set by most code that also calls > sock_queue_err_skb and also on dequeue from err skb. > > This is the main reason that I would consider dropping error > queue completely if you expect all users of RDS to use the > cmsg on regular read to get these notifications. I see. That's a good point, and maybe it makes sense to just have a struct sk_buff_head rs_zcookie_quese on the rds_sock, and have rds_rm_zerocopy_callback chain cookies ot this rs_zcookie_queue. [discussion regarding rds_recvmsg return values elided] > Okay. If callers must already handle 0 as a valid return code, then > it is fine to add another case that does this. > > The extra branch in the hot path is still rather unfortunately. Could > this be integrated in the existing if (nonblock) branch below? that's where I first started. it got even hairier because the callers expect a retval of 0 (-EAGAIN threw rds-stress into an infinite loop of continulally trying to recv) and the end result was just confusing code with the same number of branches.. let me revisit this when I spin out V2 without the sk_error_queue.. --Sowmini