Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp543705pxb; Sat, 10 Apr 2021 10:43:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTN1uUcxqzdQQZ+yo+LkUp09KvDr8dOrN6MjJM4BkszHoue7c6SOk21zPV+tX93KkQWX5w X-Received: by 2002:a62:7bcc:0:b029:244:9931:286d with SMTP id w195-20020a627bcc0000b02902449931286dmr13104993pfc.2.1618076609734; Sat, 10 Apr 2021 10:43:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618076609; cv=none; d=google.com; s=arc-20160816; b=sjBs9APiu0ZvqD99lTE/GERlINE9ERSdBGx03ePcLbTwnjXO6WAw1NAoETxZabfQCM 3wQ+FV4A6I41ZAgVJZAWZYqa00TkkGvLJaaFZzai52k7py8jgmoCmmU3XPSSYx2lfDzp jzk08syWef62yj6w89uklkyaGO07I56kTQHHK9Cd9xPncYlbEv8rLECNlxsW/qV0lQHY 6NH24//hBZlDMcU3GsUvZ20dDRLonzj7HwmJQJE6UgY+5DXu/0C35lKFDe7ziZ9U8oSw wDoWLH/oPsPKzv9tHIgnNEYkogteZ2CnuuCuvFeFTSSzPEeRQtSMsBUHh99A57t1mTUz ecZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=YQRCaZgP2UefM3Ubw17zbmZirkjkTDsaBGQG+axJ5kQ=; b=Q6U+BoXPru1lq7x98wNm5RyTCoa/v2gLQHGsJ+54Y0nlrShSNow/uW+Yu7vcgajnND X+trStmINjz6HNuyff2OjAWuW3mHnYcmdGFCQ2XGARr+ZwttSwaShdflfyP9e6KFf50m YbcDvlM64aaNNLyHImdcEeltZj1pT4BAQLf1y4ZNmSQ5hS2nQglVD/q/tKWzZKGAbFB/ E3gFSRJFb3oTHONeAU+YXFY9y54XKSX6lf+VRcGP6nsoT7O3Tuux6ADGgEUy5EkB2hwL ct5xI5Uc6EwKDS5mpbmhcCh/bZXP8B/OzkD1bbt2cP3kzI/8matelTkgaV2SHoCx0hSd exHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mjbnE9JR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si7062296pjh.34.2021.04.10.10.43.16; Sat, 10 Apr 2021 10:43:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mjbnE9JR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234879AbhDJRnB (ORCPT + 99 others); Sat, 10 Apr 2021 13:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234668AbhDJRnA (ORCPT ); Sat, 10 Apr 2021 13:43:00 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59A02C06138D for ; Sat, 10 Apr 2021 10:42:45 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id p23so6565311ljn.0 for ; Sat, 10 Apr 2021 10:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YQRCaZgP2UefM3Ubw17zbmZirkjkTDsaBGQG+axJ5kQ=; b=mjbnE9JRYwo/fH61O7Xyg2aVRfgPRGJsm4XORh9xQMVPMxNp+zDIb9pMaFMV3ATQt1 +M6LrxvuT5e9oDB0rkXB3wmBvNR5UTP6ndLcJvIlUC/C6YqLmzFDpNWr6yxOzloHsibA tBA385gGi2e6vbt5P0I+lZ4/gLnEsvg1MMxBJz/poKMw42gMCkjCZeJAsSPJtDpkVpmL h4P0hfiQhLFbhxUpMMAUkID0aSo/qqJaKEmrSEfzJ2rIKAOhoLyFc+USxeCPa8Cy817P zqEMX41eeVSLoHDtC8131M4jumJazcD+PQis77VUdbRdVU4X/JjbmLmGylWWbsV/pbX4 HxRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YQRCaZgP2UefM3Ubw17zbmZirkjkTDsaBGQG+axJ5kQ=; b=daIzgO5saFxS1gu9/cdt7BwzuE2g8HM8ocCGJlqUitSoQDtHPp7isTcO8q7XUYyuTT fQnXDXOwFuoDapyKlLiQv0z24ooTkVep9frhztygSXzU4jyy85gfhPmTtLUMwLATgx9a Oo52QuebYuaeOCthw7WTmhdvf6tPWbXFaZppSzGenya5WVoIwe1/yIFl2NnR7xj0/FJC Mr8l1HCEGheBWMGjAOn8iBdkq3nMGPNAsSL/2X66AX1f4FqVNLlMJ5+QHmWV8niyObBz 9S3+6MzpW64qJOVNzI1RaGN0n4RLXjKXDiPZY5x9Az2MVOuSbrvdQQv+ErOayxvtxeTH RXjw== X-Gm-Message-State: AOAM532X3PoqEtF5qFP54MZgrjsxbKP5tR1aryzg1aL1Socx4x3t9h1i jqhcvWhdcLziuWz+/ShiffqpzFbsd7WIh8H/XE3Jlg== X-Received: by 2002:a2e:9cc4:: with SMTP id g4mr12781684ljj.34.1618076563428; Sat, 10 Apr 2021 10:42:43 -0700 (PDT) MIME-Version: 1.0 References: <20210409223801.104657-1-mcroce@linux.microsoft.com> <20210409223801.104657-3-mcroce@linux.microsoft.com> <20210410154824.GZ2531743@casper.infradead.org> In-Reply-To: From: Shakeel Butt Date: Sat, 10 Apr 2021 10:42:30 -0700 Message-ID: Subject: Re: [PATCH net-next v3 2/5] mm: add a signature in struct page To: Ilias Apalodimas Cc: Matthew Wilcox , Matteo Croce , netdev , Linux MM , Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , "David S. Miller" , Jakub Kicinski , Thomas Petazzoni , Marcin Wojtas , Russell King , Mirko Lindner , Stephen Hemminger , Tariq Toukan , Jesper Dangaard Brouer , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Boris Pismenny , Arnd Bergmann , Andrew Morton , "Peter Zijlstra (Intel)" , Vlastimil Babka , Yu Zhao , Will Deacon , Michel Lespinasse , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Guoqing Jiang , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Aleksandr Nogikh , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Yunsheng Lin , Guillaume Nault , LKML , linux-rdma@vger.kernel.org, bpf , Eric Dumazet , David Ahern , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 10, 2021 at 9:16 AM Ilias Apalodimas wrote: > > Hi Matthew > > On Sat, Apr 10, 2021 at 04:48:24PM +0100, Matthew Wilcox wrote: > > On Sat, Apr 10, 2021 at 12:37:58AM +0200, Matteo Croce wrote: > > > This is needed by the page_pool to avoid recycling a page not allocated > > > via page_pool. > > > > Is the PageType mechanism more appropriate to your needs? It wouldn't > > be if you use page->_mapcount (ie mapping it to userspace). > > Interesting! > Please keep in mind this was written ~2018 and was stale on my branches for > quite some time. So back then I did try to use PageType, but had not free > bits. Looking at it again though, it's cleaned up. So yes I think this can > be much much cleaner. Should we go and define a new PG_pagepool? > > Can this page_pool be used for TCP RX zerocopy? If yes then PageType can not be used. There is a recent discussion [1] on memcg accounting of TCP RX zerocopy and I am wondering if this work can somehow help in that regard. I will take a look at the series. [1] https://lore.kernel.org/linux-mm/20210316013003.25271-1-arjunroy.kdev@gmail.com/