From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: Re: [PATCH net-next 2/7] rds: hold a sock ref from rds_message to the rds_sock Date: Sun, 28 Jan 2018 11:18:32 -0500 Message-ID: <20180128161832.GB22885@oracle.com> References: <20180125153527.GJ18181@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Network Development , David Miller , rds-devel@oss.oracle.com, santosh.shilimkar@oracle.com To: Willem de Bruijn Return-path: Received: from userp2120.oracle.com ([156.151.31.85]:53526 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751733AbeA1QXl (ORCPT ); Sun, 28 Jan 2018 11:23:41 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On (01/28/18 14:51), Willem de Bruijn wrote: > > On (01/25/18 15:44), Willem de Bruijn wrote: ; > >> You may alos be able to do the same as tcp zerocopy and > >> hold an sk reference on the notification skb. ; > I don't quite follow. Every notification skb is created when pages refcount > is increased. It persists until at least rds_rm_zerocopy_callback, after data > skb has been freed and pages refcount has been decreased. > > In this callback, skb is consumed if another skb is already queued on > the error queue, otherwise it is queued itself. It needs to hold a sock ref > until it can be queued. maybe I did not follow the original suggestion- were you suggesting that I hold a pointer to the sk from e.g., the skb->cb itself? I dont know that it would make things simpler, whereas having the pointer and refcount in the rds_message itself, and track this independantly of whether/not zcopy was used, seems like a more consistent dsta-structure model, so I'd like to leave this as is.