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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 DF9E3C433DB for ; Wed, 10 Mar 2021 02:05:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EE6065001 for ; Wed, 10 Mar 2021 02:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbhCJCEw (ORCPT ); Tue, 9 Mar 2021 21:04:52 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:48652 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231235AbhCJCEp (ORCPT ); Tue, 9 Mar 2021 21:04:45 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lJoD9-00A6SO-NR; Wed, 10 Mar 2021 03:04:31 +0100 Date: Wed, 10 Mar 2021 03:04:31 +0100 From: Andrew Lunn To: Eric Dumazet Cc: Shay Agroskin , David Miller , Jakub Kicinski , netdev@vger.kernel.org, "Woodhouse, David" , "Machulsky, Zorik" , "Matushevsky, Alexander" , Saeed Bshara , "Wilson, Matt" , "Liguori, Anthony" , "Bshara, Nafea" , "Tzalik, Guy" , "Belgazal, Netanel" , "Saidi, Ali" , "Herrenschmidt, Benjamin" , "Kiyanovski, Arthur" , "Jubran, Samih" , "Dagan, Noam" Subject: Re: [RFC Patch v1 1/3] net: ena: implement local page cache (LPC) system Message-ID: References: <20210309171014.2200020-1-shayagr@amazon.com> <20210309171014.2200020-2-shayagr@amazon.com> <67d3cf28-b1fd-ce51-5011-96ddd783dc71@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67d3cf28-b1fd-ce51-5011-96ddd783dc71@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 09, 2021 at 06:57:06PM +0100, Eric Dumazet wrote: > > > On 3/9/21 6:10 PM, Shay Agroskin wrote: > > The page cache holds pages we allocated in the past during napi cycle, > > and tracks their availability status using page ref count. > > > > The cache can hold up to 2048 pages. Upon allocating a page, we check > > whether the next entry in the cache contains an unused page, and if so > > fetch it. If the next page is already used by another entity or if it > > belongs to a different NUMA core than the napi routine, we allocate a > > page in the regular way (page from a different NUMA core is replaced by > > the newly allocated page). > > > > This system can help us reduce the contention between different cores > > when allocating page since every cache is unique to a queue. > > For reference, many drivers already use a similar strategy. Hi Eric So rather than yet another implementation, should we push for a generic implementation which any driver can use? Andrew