Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3989330rdh; Tue, 28 Nov 2023 08:54:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEm+jdBTQYW9/a4t1MZ8MmKiErXJx/rJuYuATKmVLckiQtrkWypXIF9fqpfveTomg7XwSpQ X-Received: by 2002:a05:6820:1caa:b0:581:f6b9:30d9 with SMTP id ct42-20020a0568201caa00b00581f6b930d9mr15255196oob.8.1701190480200; Tue, 28 Nov 2023 08:54:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701190480; cv=none; d=google.com; s=arc-20160816; b=BNHmxTb4q7P98Hlz0W9e5waToBoZy2legpk8Q84Hi+oSghfEMYIZ8JL7IIdNpsH06q GAwRlfX3PFoyMUItLyiEaFgQMwarMhhhzM0vh+Xlck3lCDUWqs3YYhO3sc2wXZqWoJV7 OjzH4Eb1EKaJ6j5uuRc3TE1jSDjIV0zO8ajzhA+Z34uMQ1MGKlh2GNWXy4WVShPw92r+ fpMYqTrPSK31K8zv1mgCNxSh7rfG6hzLzc6AsmbxX4u8aeTjMCKF/OcwAzGDZALTeNnS Y28dl3QpfQ98XzRv27TxAbcrG8wjE0XbCPyyXlPLJFADbPuUuLPSmdwGOSy398v1gYll GYZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=DC3BsxQqnM7yKxO4WOZgqSbFH0kKuVbdjOY34ARb/mE=; fh=dur5szEg+XY9M4HY0DpKabu5fBlwydG0VvcOBPyHEUM=; b=zgIGBa6/Ht4PLDKdKRiT+zVmqeA1VtjUd71nNaXvsWyQWw9VDd5OKKg/ux53rBCwb7 VgzOMrPStLoLZIoiRq/vMKduVB7lIt0/Ti3PCGMMqMDnZCH8QhVhOmixKMO4XIunxGGM +BPEibdVAnxv6etBsZ5ITZBKDOemCmMIs6jKLQwAjhSB5R4tTO6gxM7hQQP0W5Mv8Hzz UX8Ceo8CGjrXG06Nxzyqm0n9P5VqYFP8igzQW0jRCE4UHpSO9+4dOmB0Z5MoWPriNOo9 t8PXfAJw5BQcpi7T6ECCPxHcTVMbIBwg/0XssRz6YakcYDGC/WLtFkjpnQCtiIX90fBS PUaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id q9-20020a656249000000b005b55df27b44si12007076pgv.340.2023.11.28.08.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 08:54:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7AE3B816822C; Tue, 28 Nov 2023 08:54:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344876AbjK1QyX (ORCPT + 99 others); Tue, 28 Nov 2023 11:54:23 -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 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 28 Nov 2023 08:54:37 -0800 (PST) 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.