Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2975814pxj; Sun, 6 Jun 2021 21:44:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAlxPNGCvmAcv0XXA2fSn3wJxe6aSZ10Ts5sjn2uTwVe62EwBrSrop6gZ6TAcBhulSpc2+ X-Received: by 2002:a17:906:1dc5:: with SMTP id v5mr15921037ejh.212.1623041047194; Sun, 06 Jun 2021 21:44:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623041047; cv=none; d=google.com; s=arc-20160816; b=K8q7DLntdROlajKrOPVFSZOgDMC9GE+pTn/4sDO+y5GbfCGIl8t3K+UcI6o3QoGAI1 Kz6snIgczRfoHT5g85lmml9y/yyATEb/mAD5Zxw5j4IVeCrYB+zARdoT9nzFmkJtxeNd yW6wZZLBKak4zWq+T8M2MWp2bAYklyfNj4MEnlCbV9ggKwUjIDHxaVXOWns79BlJldu/ AYJmTRxdsMLLbRiFRhduQf0cxmJ04Z5uxyUj3QyhhNi2rah6FXKa64FemDVJalW9OSGs 9jf7tLweIKt9Wd4xGQLm6J7WAHZlQlvo+4e6i2S//xIPaxbUW38a/SHhuxAkLyVhFxS5 4sSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x9T5pBSugoXfUpXUjZ5j/66j/njzDcDs53OE8tdEeqg=; b=PAgxTp5CwdrZUKNZsONlSHqmwurg7meIlf3zpwQTwsEDbXtWGQgyy5HN8hnifR95EA ucA6vuUTvc/N6Z99BDqQ7hiKM0pq2LG0sZM+azG066vGUrog662I2J7YjjgpzDv7hexQ 1nbJKVxd9RGKmLRxzCVFeF/lH9i+OKuZ1NT49dLAMgPBKOOQSo08+fpVv25PqHbcIC6F Wvw5s00CjAVFQ10ihdXqJzbaPc3sRpUkiuWGXAB6Bm2ejxxl6K2mGCHYpEtJ8k9FutAi IPEcKVC0JRh7b/g4QkQNsXKpIAKVIyfkmgfb0TKHQa8npOyE0x8yEfmsQQrv3ZA6vRn5 jlVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dsbm6Zae; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de5si12263749edb.595.2021.06.06.21.43.44; Sun, 06 Jun 2021 21:44:07 -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=@linaro.org header.s=google header.b=dsbm6Zae; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbhFGEjK (ORCPT + 99 others); Mon, 7 Jun 2021 00:39:10 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:35620 "EHLO mail-wm1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhFGEjJ (ORCPT ); Mon, 7 Jun 2021 00:39:09 -0400 Received: by mail-wm1-f43.google.com with SMTP id k5-20020a05600c1c85b02901affeec3ef8so1321890wms.0 for ; Sun, 06 Jun 2021 21:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x9T5pBSugoXfUpXUjZ5j/66j/njzDcDs53OE8tdEeqg=; b=dsbm6ZaentwbYXK1/AX02BUJNveYH454Bc8Hxkr7AuBiVrsN0BwXTGFy2clCJ3Jnaa GVTrl601GfVuELPA/rENvBHO99Cy1m2KaZ8VVysBjujsFon1u+rGpWWuuR4VVwcognXg jUSks59gR0/wnezCcElQ23S/7PPhUz0TUqPnzHreb7oT4TLB53lh5OGwuENgESqfyNk9 5CU7WXl0wn1KyvZr8sZisHG+5yxfr5M517OOBXZfBORui+ZBnTIaPD3UV1Q6xzY+ZuLv WuD/vIzz5AylzaeEZmgBpvTFNQi4ZGVNTBgD+VEAaB41Pi3aX25tA3hGs7PgBHFLI4rg kL7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x9T5pBSugoXfUpXUjZ5j/66j/njzDcDs53OE8tdEeqg=; b=Fb/bd0tp2PjlPlwGgwDXpl3tasfJB/AYSs2PZ1lltFednGm8ycqVdKKmuzBl1SfUIJ gQOJ2IUqYnPN+GEyiTpqJqhpgLZXBQwQAn6mB8Qj1k6MGWoxuesxqpDcjAGh6n8JxC/I ywOaC5VdYF8l6q0uQfZMQwVPy0xD6VfTgVjG46/NwDBB+t9fNwkeArl3Xp2/7I1xuQQH zgIB1Sr0FMKkD+k03qLvXulM5htpGUaFM/CThmuBacwbPNkHbcPlOoJgL6Yvzfeld+1h P2C/cwDyrPH0MV8wLs2D5Ien03ewFEGVX/m+wBSuK1ZP15vdoF1GfHA9kgEjU+Rq4tpz P0Sw== X-Gm-Message-State: AOAM530ifrAWYT+e/dRXmJcAIyQJP4Qfk2ABY8Fmwp/ItYcJB1JA5Jlk m8bRMXN9Vw93HKZ/tyo/fNmFLw== X-Received: by 2002:a1c:a3c3:: with SMTP id m186mr15287383wme.154.1623040564231; Sun, 06 Jun 2021 21:36:04 -0700 (PDT) Received: from Iliass-MBP (ppp-94-66-57-185.home.otenet.gr. [94.66.57.185]) by smtp.gmail.com with ESMTPSA id o17sm13829115wrp.47.2021.06.06.21.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Jun 2021 21:36:03 -0700 (PDT) Date: Mon, 7 Jun 2021 07:35:58 +0300 From: Ilias Apalodimas To: David Ahern Cc: Yunsheng Lin , Matteo Croce , netdev@vger.kernel.org, linux-mm@kvack.org, 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 , Fenghua Yu , Roman Gushchin , Hugh Dickins , Peter Xu , Jason Gunthorpe , Jonathan Lemon , Alexander Lobakin , Cong Wang , wenxu , Kevin Hao , Jakub Sitnicki , Marco Elver , Willem de Bruijn , Miaohe Lin , Guillaume Nault , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, Matthew Wilcox , Eric Dumazet , Lorenzo Bianconi , Saeed Mahameed , Andrew Lunn , Paolo Abeni , Sven Auhagen Subject: Re: [PATCH net-next v6 3/5] page_pool: Allow drivers to hint on SKB recycling Message-ID: References: <20210521161527.34607-1-mcroce@linux.microsoft.com> <20210521161527.34607-4-mcroce@linux.microsoft.com> <722e5567-d8ee-228c-978e-9d5966257bb1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <722e5567-d8ee-228c-978e-9d5966257bb1@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Sat, Jun 05, 2021 at 10:06:30AM -0600, David Ahern wrote: > On 6/4/21 2:42 AM, Ilias Apalodimas wrote: > > [...] > >>> + /* Driver set this to memory recycling info. Reset it on recycle. > >>> + * This will *not* work for NIC using a split-page memory model. > >>> + * The page will be returned to the pool here regardless of the > >>> + * 'flipped' fragment being in use or not. > >>> + */ > >> > >> I am not sure I understand how does the last part of comment related > >> to the code below, as there is no driver using split-page memory model > >> will reach here because those driver will not call skb_mark_for_recycle(), > >> right? > >> > > > > Yes the comment is there to prohibit people (mlx5 only actually) to add the > > recycling bit on their driver. Because if they do it will *probably* work > > but they might get random corrupted packets which will be hard to debug. > > > > What's the complexity for getting it to work with split page model? > Since 1500 is the default MTU, requiring a page per packet means a lot > of wasted memory. It boils down to 'can we re-use the page or is someone using it'. Yunsheng sent a patch in earlier series that implements this with ref counters. As Matteo mentions we can also add another page pool type. In theory none of those sound too hard, but we'll have to code it and see. /Ilias