From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5195A29; Tue, 15 Oct 2024 00:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728951248; cv=none; b=SaOX523pkxF3SvnwTHR1mVC3Pz+22Vndjw1cMiSDYmbc9TU5QmeMzGcXi8ZSyjUU87NkMmKiLW8vqWI5nHLrpAta/2lUAVW19OV2dwfLEb2tdNjhbgRO9amseTbfhrA84O4799w5wtts/pHtC3xzZmm/azaPk4Kbdnxu+YGMU2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728951248; c=relaxed/simple; bh=vC2js+3LTh37+eK6v22mAPM7Aj/mMz6+h5IByLtkN9E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ax7cXifOTYNRGxrdq3Bpil1KO71iaja7Rx1D6lJ9lLe36y2QvxJbIGntBtpCmzmhXgmPOrkvl3FY84/5IG086SWAN2GZF2skOF6/Rt/KSQZ2Rmn1HAyUcGwyMS+cAeatQTh2diXfCPYaz6z5//yIo7/ZrqtPoy2hnas3MNAIMW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KA8B/kcn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KA8B/kcn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69880C4CEC3; Tue, 15 Oct 2024 00:14:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728951248; bh=vC2js+3LTh37+eK6v22mAPM7Aj/mMz6+h5IByLtkN9E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KA8B/kcn+CyFsGvB5lRCxHl/oMJ1/+ytr1xDfxtbTs2DknFuUjJajsNy0pBQtNinE aBThc9YZ1cFhAt31Z5v+RM/dhm2JAPTKuGtyuje64hxEH/H5VEHEbjO4USBbUN1fAj guPIt3CzR7l2Z+1Z0iyzUflxo7LwX4BZfgu0zRLrp0OQKlnGPZAWBX+nVhbl7Gsjv6 QUT/nM9S1klJHU1VYvDFpllFdm+q/ha04BQtbSPGDMqXRkoJOlhnkVy9vfNjYfYlgJ jQjJ7ODdnQfVsF0VXXApSdXdP/on+vs9Gx0cHlCCgG8uaZ6zjBRSt7o7Mfyx1NvgCU 8QE2ujuElZjug== Date: Mon, 14 Oct 2024 17:14:06 -0700 From: Jakub Kicinski To: Yunsheng Lin Cc: , , , , , Alexander Lobakin , Robin Murphy , Alexander Duyck , IOMMU , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Matthias Brugger , AngeloGioacchino Del Regno , , , , , , Subject: Re: [PATCH net v2 0/2] fix two bugs related to page_pool Message-ID: <20241014171406.43e730c9@kernel.org> In-Reply-To: References: <20240925075707.3970187-1-linyunsheng@huawei.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 12 Oct 2024 20:05:31 +0800 Yunsheng Lin wrote: > 1. Semantics changing of supporting unlimited inflight pages > to limited inflight pages that are as large as the pool_size > of page_pool. How can this possibly work? The main thing stopping me from reposting my fix that it'd be nice to figure out if a real IOMMU device is bound or not. If we don't have real per-device mappings we presumably don't have to wait. If we can check this condition we are guaranteed not to introduce regressions, since we would be replacing a crash by a wait, which is strictly better. If we'd need to fiddle with too many internals to find out if we have to wait - let's just always wait and see if anyone complains. 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 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2146FD18159 for ; Tue, 15 Oct 2024 00:14:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B6D4A408EC; Tue, 15 Oct 2024 00:14:13 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 6jILv7pAPmlv; Tue, 15 Oct 2024 00:14:13 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D1DE4402E5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1728951252; bh=D1bOouhGYp8qYUjvtk9VBz/g0FK7jRRodQ+2KCWlw7I=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=6I9rCMFJDaupY0bipKnN1V2SZFY0yiULYWWxprMsWgyIVmHygdsA+b8iQdZX5etRk Z6fZAeDTLgQ/ce7SI+wlQJU34oHtGyUCv79EzNjV76xEQzLviPx4SsBfWgDYqaZshk f7uh3F1Xo9gQulFNaEErSR4PfekwjfxmbNPmiOCVJj/n+YW33VB84rz62E3nIxwev7 1XSoR+EQus5ntuQ/9hmsFWP9LqYShZVznxLhyvMwa4oDCHFnC/EgqAbQf6a+ozS1Ad 4zOItInb0nodWXkaDDjK40zdNlK0209l96OhNFO/bGfR0qRbiKktEPnQ/SqA0l/hMk 69z6FdkA5B0bw== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id D1DE4402E5; Tue, 15 Oct 2024 00:14:12 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 7EC6E1BF2EB for ; Tue, 15 Oct 2024 00:14:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6C1C1402E5 for ; Tue, 15 Oct 2024 00:14:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id du-coyL2xEle for ; Tue, 15 Oct 2024 00:14:10 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2604:1380:45d1:ec00::3; helo=nyc.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 7B2B840137 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7B2B840137 Received: from nyc.source.kernel.org (nyc.source.kernel.org [IPv6:2604:1380:45d1:ec00::3]) by smtp2.osuosl.org (Postfix) with ESMTPS id 7B2B840137 for ; Tue, 15 Oct 2024 00:14:10 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 98022A42980; Tue, 15 Oct 2024 00:13:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69880C4CEC3; Tue, 15 Oct 2024 00:14:07 +0000 (UTC) Date: Mon, 14 Oct 2024 17:14:06 -0700 From: Jakub Kicinski To: Yunsheng Lin Message-ID: <20241014171406.43e730c9@kernel.org> In-Reply-To: References: <20240925075707.3970187-1-linyunsheng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728951248; bh=vC2js+3LTh37+eK6v22mAPM7Aj/mMz6+h5IByLtkN9E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KA8B/kcn+CyFsGvB5lRCxHl/oMJ1/+ytr1xDfxtbTs2DknFuUjJajsNy0pBQtNinE aBThc9YZ1cFhAt31Z5v+RM/dhm2JAPTKuGtyuje64hxEH/H5VEHEbjO4USBbUN1fAj guPIt3CzR7l2Z+1Z0iyzUflxo7LwX4BZfgu0zRLrp0OQKlnGPZAWBX+nVhbl7Gsjv6 QUT/nM9S1klJHU1VYvDFpllFdm+q/ha04BQtbSPGDMqXRkoJOlhnkVy9vfNjYfYlgJ jQjJ7ODdnQfVsF0VXXApSdXdP/on+vs9Gx0cHlCCgG8uaZ6zjBRSt7o7Mfyx1NvgCU 8QE2ujuElZjug== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KA8B/kcn Subject: Re: [Intel-wired-lan] [PATCH net v2 0/2] fix two bugs related to page_pool X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mediatek@lists.infradead.org, Jesper Dangaard Brouer , Daniel Borkmann , netdev@vger.kernel.org, John Fastabend , Alexei Starovoitov , Alexander Duyck , linux-kernel@vger.kernel.org, Alexander Lobakin , IOMMU , liuyonglong@huawei.com, Matthias Brugger , intel-wired-lan@lists.osuosl.org, zhangkun09@huawei.com, fanghaiqing@huawei.com, bpf@vger.kernel.org, pabeni@redhat.com, Robin Murphy , davem@davemloft.net, linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Sat, 12 Oct 2024 20:05:31 +0800 Yunsheng Lin wrote: > 1. Semantics changing of supporting unlimited inflight pages > to limited inflight pages that are as large as the pool_size > of page_pool. How can this possibly work? The main thing stopping me from reposting my fix that it'd be nice to figure out if a real IOMMU device is bound or not. If we don't have real per-device mappings we presumably don't have to wait. If we can check this condition we are guaranteed not to introduce regressions, since we would be replacing a crash by a wait, which is strictly better. If we'd need to fiddle with too many internals to find out if we have to wait - let's just always wait and see if anyone complains.