Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp168763rwo; Fri, 21 Jul 2023 10:01:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlFHh/eHKYp/uYTs/DRdNdP1j2kSRjcx03NKtsZ9ORy2KJpzj7TaA+9eWv9IbiMkD1UfocGx X-Received: by 2002:a05:6a00:1398:b0:662:f0d0:a77d with SMTP id t24-20020a056a00139800b00662f0d0a77dmr638792pfg.30.1689958903252; Fri, 21 Jul 2023 10:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689958903; cv=none; d=google.com; s=arc-20160816; b=I4TQMixj28BkcvigGzQXmZJjgr7yfnpHk7HMyQMBjK4zb4G6Xjjuu1tM7lqyUNLfbe oRpVI85KGCwtvNHzcjeKHxBU2ji2wZhYU4e+WDP6pH0B0fdc/UMJv1hrqdcQ0zJgTEwL PSj1TP0XLMTQYIlHh13jkokWpdC0CFHfwVgNDXM4itPOEk1nNAvUU2kk+7PX+5M61oJR cr3bKaxWudF4B2/xHz/gedVO4UzDlnahXSY5pX4BqRRuNBe7ZCceuduKzdCQYt1ElqHd UxINX1YLfpClozk7Gp3BReHi3f6qpy2S6VTrRsLJinMfUtMrwJ07WhjQB5wN+pTWAN6j DMtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=PolVr6JhAwwa4P5Jj/aOkBeTkNv6xy6Y1lUt9qDuNks=; fh=n4RtIlpe+3F7bWIY3tMKJ+gqJ0nqrIa6RMcoqAn7pvc=; b=qTrLdMnMUyOt7oTOzyItMM1h39nPHU+shOIxcDJ0zj9jCd0BniaTL2nYpF2VdYwusq Ji0//7oRWwytXdBqwhlZIr+YEjbwYvNC04nrkv65QIl7+Lburyr7LGt3V0qZJZO2+P55 gLJHzIau3raVQqEft6niEjghctfMGTEHJqSTZTX6JPR2pMduz0GJXIOK+43CebfwXueR /5CbDGUWxuwH1htaswBhrwmUeJy2yMGqkAWkRTw7u+HdYYTNtiA48LB8D2jIgzG8qRpg 02t8DhytLGjwZer0QRtfP4HAZRT5+IqojPX6tr5tqVHtw+qVOuOT5ntb5cREdjXJuXJC +k9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ApAy324I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u186-20020a6379c3000000b0055aff745fe2si3081502pgc.406.2023.07.21.10.01.16; Fri, 21 Jul 2023 10:01:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ApAy324I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232399AbjGUQBw (ORCPT + 99 others); Fri, 21 Jul 2023 12:01:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232411AbjGUQBg (ORCPT ); Fri, 21 Jul 2023 12:01:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B6313AAA for ; Fri, 21 Jul 2023 09:01:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EBCBE61D23 for ; Fri, 21 Jul 2023 16:01:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDDA6C433C7; Fri, 21 Jul 2023 16:01:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689955290; bh=PA8mIgj50fgfgrMmzr5lfjZFBWvQfHEld71JX4l0vVw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ApAy324Isd9NkMwHiREvXxaFH9gl3vLG53CvMG2D5xH2Qp1tl7DI+Vsm77Y077GXX 9o4KMZKE5dVK3YEWO0FxBiI971ZmKeEAGuzLxLrbitRq5DjKpfoVQ1p0tfitMnwU3g M3kjLl9nwy0tPuDc8NJdUgmdJHBPyi79psylyw+gEvznThbSsxSGD+Ay6nh5ZzGHg+ pZ9tsTBH7mI8RDI+dTVM9ctjiXsVpdJR26EVxahTnhQcxtpxQe0jt9msdvMUBXnqJZ lFLbtOd3ekcSfi4h8NS/Q7VpmnjhDii+aBVkaahbn9jKDIozAa2WfXR1wwbwC5e5a0 6dYEzHJBaUvrg== Date: Fri, 21 Jul 2023 09:01:29 -0700 From: Jakub Kicinski To: Alexander Lobakin , Yunsheng Lin Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Maciej Fijalkowski , Larysa Zaremba , Alexander Duyck , Jesper Dangaard Brouer , Ilias Apalodimas , , Subject: Re: [PATCH RFC net-next v2 7/7] net: skbuff: always try to recycle PP pages directly when in softirq Message-ID: <20230721090129.4a61033b@kernel.org> In-Reply-To: References: <20230714170853.866018-1-aleksander.lobakin@intel.com> <20230714170853.866018-10-aleksander.lobakin@intel.com> <20230718174042.67c02449@kernel.org> <20230719135150.4da2f0ff@kernel.org> <48c1d70b-d4bd-04c0-ab46-d04eaeaf4af0@intel.com> <20230720101231.7a5ff6cd@kernel.org> <8e65c3d3-c628-2176-2fc2-a1bc675ad607@intel.com> <20230720110027.4bd43ee7@kernel.org> <988fc62d-2329-1560-983a-79ff5653a6a6@intel.com> <20230720122015.1e7efc21@kernel.org> <20230720124647.413363d5@kernel.org> <406885ee-8dd0-1654-ec13-914ed8986c24@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Jul 2023 17:37:57 +0200 Alexander Lobakin wrote: > > Does it mean ptr_ring_produce_any() is needed in > > page_pool_recycle_in_ring() too? > > > > As it is assumed that page pool API can be called in the context with > > irqs_disabled() || in_hardirq(), and force recylcling happens in the > > prt_ring. > > > > Isn't it conflit with the below patch? as the below patch assume page > > pool API can not be called in the context with irqs_disabled() || in_hardirq(): > > [PATCH net-next] page_pool: add a lockdep check for recycling in hardirq > > > > Or am I missing something obvious here? > > No, Page Pool is *not* intended to be called when IRQs are disabled, > hence the fix Jakub's posted in the separate thread. Yeah, it's just a bandaid / compromise, since Olek really wants his optimization and I really don't want to spend a month debugging potential production crashes :) On the ptr ring the use may still be incorrect but there is a spin lock so things will explode in much more obvious way, if they do.