From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76F71C433E3 for ; Tue, 28 Jul 2020 18:00:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 620F320672 for ; Tue, 28 Jul 2020 18:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732104AbgG1SAo (ORCPT ); Tue, 28 Jul 2020 14:00:44 -0400 Received: from smtp5.emailarray.com ([65.39.216.39]:29979 "EHLO smtp5.emailarray.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbgG1SAo (ORCPT ); Tue, 28 Jul 2020 14:00:44 -0400 Received: (qmail 5607 invoked by uid 89); 28 Jul 2020 18:00:42 -0000 Received: from unknown (HELO localhost) (amxlbW9uQGZsdWdzdmFtcC5jb21AMTYzLjExNC4xMzIuMw==) (POLARISLOCAL) by smtp5.emailarray.com with SMTP; 28 Jul 2020 18:00:42 -0000 Date: Tue, 28 Jul 2020 11:00:40 -0700 From: Jonathan Lemon To: Greg KH Cc: netdev@vger.kernel.org, kernel-team@fb.com Subject: Re: [RFC PATCH v2 11/21] core/skbuff: add page recycling logic for netgpu pages Message-ID: <20200728180040.az3xgwzmuz6grv32@bsd-mbp.dhcp.thefacebook.com> References: <20200727224444.2987641-1-jonathan.lemon@gmail.com> <20200727224444.2987641-12-jonathan.lemon@gmail.com> <20200728162825.GC4181352@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728162825.GC4181352@kroah.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jul 28, 2020 at 06:28:25PM +0200, Greg KH wrote: > On Mon, Jul 27, 2020 at 03:44:34PM -0700, Jonathan Lemon wrote: > > From: Jonathan Lemon > > > > netgpu pages will always have a refcount of at least one (held by > > the netgpu module). If the skb is marked as containing netgpu ZC > > pages, recycle them back to netgpu. > > What??? Yes, this is page refcount elevation. ZONE_DEVICE pages do this also, which is hidden in put_devmap_managed_page(). I would really like to find a generic solution for this, as it has come up in other cases as well (page recycling for page_pool, for example). Some way to say "this page is different", and a separate routine to release refcounts. Can we have a discussion on this possibility? -- Jonathan