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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 BF90BC44501 for ; Wed, 15 Jul 2026 11:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f14g3eRyyv8r7gbbzRptTQGbfsDCiij3wkULxA9pH+c=; b=M+tUebv1vEnpC4xmE4vvPjj+Fk PU9zqXwm5U8RFFrGwgRodOgPZCN3TRzq4upi4hejOyJ0fhRGIvWrmlId8ijAF3KAHTlDNxBYCFlPm g+YkmASOD8kNOj7o8B8zdTiIZvG41tIQEj5M6F0CLlKXl0qSLszxf88zoBLGObLE1RUbzBtBqMQ+N FIMfxardBG2RwmMOIhvhoKyZvQN9F0iyfiuTlo1ZA0VTllH4500Q41j7to6ZMiIRfvUFCHOoIT/8P ia5iKadyU2wS1yBIxik8F/ZrhG5LljiikrJ19y21n2kqodH8bk05jqwBTJp2JmAV1Umpr0YjjdHQB dD/j7+Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wjy49-0000000EcFM-2IwG; Wed, 15 Jul 2026 11:46:17 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wjy47-0000000EcEz-3H2B for linux-arm-kernel@lists.infradead.org; Wed, 15 Jul 2026 11:46:15 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 36AF1601ED; Wed, 15 Jul 2026 11:46:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 805611F00A3D; Wed, 15 Jul 2026 11:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784115974; bh=f14g3eRyyv8r7gbbzRptTQGbfsDCiij3wkULxA9pH+c=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=AbgbyXHl8cUaEz3REEKzALyupk0CFVibINKRLG2uDfaa6k5WSa1ZjsVa0lXEjYrJV mIgfYde0/JNKHbZ6t1L+PyWbEPHaesOkj3iTlSHbBLC/S2TY5L88SdBfed261+FcTp xhIwodabTjxe8Es9YfE43rL+731HMh3MvzIs4fQV1sRULgc3ar4nZTQTWueLfdIMpU Aa0dn6P+ikDQQwjqJO+lfkgcKsFuJuYYbnPjQfh2Ae6Ech2mfjsmYiQVBej1SGOxJt Ht5k5epDJgrhA331QxV+cXjMM/xQ1MYLv3qQvZzz32cgBgA59hUGtH3zxt2MyUCaDl bDHbPVdbnrGLw== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 981FAF4006A; Wed, 15 Jul 2026 07:46:13 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 15 Jul 2026 07:46:13 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTE6lo2AS56jZyzx7GorcfUYrhxiBJWxGWdJtmOsWtXHXx7oT+ZZG0WbO09bxneiMa 30CkTgTNA8890T4LToWMNPiOXt37bxdE4E/TZKW0P1JxhHb2zrgPIM5r3k8/e3H4j1y+fZ 8/MTg3DGHXkEcQQQFj56E8oJR+mWMss6Bw9ov4Nk55IjEr/oU/hDfnvr1i2sO4aIl80Mar HBJFidpj7fxjrN+3r2/oN2/jemBvZoAiTquYZBY+ZNmf7U4jA5dwEtPmt/JNyu8veLabrf 9NUHwSJz5cSM964BW3/z59OR8d2bdvTLvqfxAaY2V7bqYkZ5YIV1don3Izxik3JYJJpNFd 8Ww6rOwBsrvMNUJ8MPAI3Pq3bQbMKWtKXA19o6Y2yMsTriEBsO9Ihwux22K/CpKhSnql5Y bL7AhT9jWfPUXeGGd52FmWrL2HIGyyT6GdWMTwL6Lw9z4eFMTdiBFPiaQL69hc5uag0QNR qSTuAsE0S1luz9lerRtF8MvR7eMeJsIakd1fossbAurgISBUaYktS+sOt/+wFjlPXCWFme ufuTUAsjr9OLq8ZXKfbaKrjKGQnog2e+K05o76vM950CCwy+PCPfsQHpsg+MJG3nI95V05 1WszXm3TkiMWcgFHK6Aln3QCxLRwUpYx0sj8SHIy8qcgdfsqSILFRTgbH6xw X-ME-Proxy: Feedback-ID: i10464835:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Jul 2026 07:46:12 -0400 (EDT) Date: Wed, 15 Jul 2026 12:46:11 +0100 From: Kiryl Shutsemau To: Will Deacon , Robin Murphy , Joerg Roedel Cc: Jason Gunthorpe , Nicolin Chen , Pranjal Shrivastava , Breno Leitao , Kyle McMartin , Usama Arif , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] iommu/arm-smmu-v3: Shrink command/event/PRI queues in kdump kernel Message-ID: References: <20260706084708.8072-1-kas@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260706084708.8072-1-kas@kernel.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 06, 2026 at 09:47:08AM +0100, Kiryl Shutsemau (Meta) wrote: > All SMMU queues are sized from the maxima the hardware advertises in IDR1, > which can be several megabytes each, and are allocated at probe. The kdump > kernel already disables the event and PRI queues (arm_smmu_device_reset() > drops CR0_EVTQEN/CR0_PRIQEN) but still allocates them at full size. On > systems with many SMMUv3 instances that cost is paid per instance and adds > up to tens of megabytes of coherent DMA in the capture kernel. > > A kdump capture kernel runs from a small crashkernel reservation and only > has to drive the few devices used to save the dump, so deep queues serve > no purpose. The queues are not on the DMA data path, so dump throughput is > unaffected; a shallower command queue only bounds how many commands may be > in flight before a sync, which does not matter for the capture kernel's > small device count and modest I/O. > > Clamp every queue to a single page when is_kdump_kernel() is true. Doing > it in arm_smmu_init_one_queue() covers the command, event and PRI queues > in one place. The command queue still holds at least one batch plus a sync > (256 entries on a 4K-page kernel, well above CMDQ_BATCH_ENTRIES), so > command batching keeps working. > > Suggested-by: Kyle McMartin > Signed-off-by: Kiryl Shutsemau (Meta) > Reviewed-by: Breno Leitao > Reviewed-by: Pranjal Shrivastava > Reviewed-by: Jason Gunthorpe > Reviewed-by: Nicolin Chen > Tested-by: Nicolin Chen Gentle ping? -- Kiryl Shutsemau / Kirill A. Shutemov