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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01CACC4167B for ; Tue, 28 Nov 2023 16:54:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344838AbjK1QyY (ORCPT ); Tue, 28 Nov 2023 11:54:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234890AbjK1QyV (ORCPT ); Tue, 28 Nov 2023 11:54:21 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C3EE10E2; Tue, 28 Nov 2023 08:54:27 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0BC9AC15; Tue, 28 Nov 2023 08:55:14 -0800 (PST) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F22403F6C4; Tue, 28 Nov 2023 08:54:24 -0800 (PST) Message-ID: Date: Tue, 28 Nov 2023 16:54:23 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Bug in add_dma_entry()'s debugging code Content-Language: en-GB To: Andy Shevchenko Cc: Alan Stern , Christoph Hellwig , Hamza Mahfooz , Dan Williams , Marek Szyprowski , Andrew , Ferry Toth , Thorsten Leemhuis , iommu@lists.linux.dev, Kernel development list , USB mailing list , Catalin Marinas , Will Deacon References: <736e584f-7d5f-41aa-a382-2f4881ba747f@rowland.harvard.edu> <20231127160759.GA1668@lst.de> <637d6dff-de56-4815-a15a-1afccde073f0@rowland.harvard.edu> <20231128133702.GA9917@lst.de> From: Robin Murphy In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/11/2023 4:34 pm, Andy Shevchenko wrote: > On Tue, Nov 28, 2023 at 6:31 PM Robin Murphy wrote: >> On 28/11/2023 3:18 pm, Alan Stern wrote: >>> On Tue, Nov 28, 2023 at 02:37:02PM +0100, Christoph Hellwig wrote: > > ... > >>>> The logical confcusion from that would be that IFF dma-debug is enabled on >>>> any platform we need to set ARCH_DMA_MINALIGN to the cache line size. >>> >>> (IF, not IFF.) And tell distributions that CONFIG_DMA_API_DEBUG is not >>> meant for production systems but rather for kernel testing, right? >> >> Yikes, I'd hope that distros are heeding the warning that the Kconfig >> calls out already. It's perhaps somewhat understated, as I'd describe >> the performance impact to large modern systems with high-bandwidth I/O >> as somewhere between "severe" and "crippling". > > Independently on the distros configurations the (false positive) > message(s) will make difficult to debug the actual things, shouldn't > we have our code robust in any case? Sure, I have no objection to making dma-debug more robust and useful for its intended purpose, I was just commenting on the fact that any potential change in behaviour from this should be of less concern to distros than the significant change in behaviour that enabling it *already* poses (i.e. globally serialising DMA operations and doing inherently slow stuff in what are normally expected to be fast paths). Thanks, Robin.