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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88E79C4828D for ; Wed, 31 Jan 2024 14:58:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3D298D0005; Wed, 31 Jan 2024 09:58:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DEE348D0001; Wed, 31 Jan 2024 09:58:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CB48F8D0005; Wed, 31 Jan 2024 09:58:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id AE7748D0001 for ; Wed, 31 Jan 2024 09:58:25 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 70C3DC0D4B for ; Wed, 31 Jan 2024 14:58:25 +0000 (UTC) X-FDA: 81739912170.23.73896B8 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf22.hostedemail.com (Postfix) with ESMTP id 8ACADC0019 for ; Wed, 31 Jan 2024 14:58:22 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=spdpNVJY; spf=pass (imf22.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706713102; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ylNdS+3OQaqf1UGVCYgXPPh6NHjLF4GaarW924QO7RE=; b=h1c0Of3HVtaMn4EJ8nfQ5rcxpcv+t8u32aODrBj28d7ixPBwdU7M/xqYnrH7lwBYVEos0r IdpbDnPwRp0XD7jn7HBmPvrVcNTvezxBNH7/6ZNNXjj8ItfJ/k3OScENqePJfHgzfS2Omd wPWXMwxANRp1JEKrR/+hpY4PJv7Qiqw= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=spdpNVJY; spf=pass (imf22.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706713102; a=rsa-sha256; cv=none; b=ta9nsIb9h39MMSupwe/6uNagfS+OB6l3WWTp6klT2PJbQ1xOxqdWoNTozFTmrVMef+DoRv P4xf+bISr6yfJIyZgmtp2nCR0aMOs+EbDu4oF9Q1xMylGbpLjiHbFjvfomVqoHoGlXPtXU y8+6DT2g/GSxP9MJQp59qsanbwx5geg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706713101; bh=L5pJpQ5dE+OFLWNsblvXxIVZo1jX7Zp/Itn5Bx1Ke3Y=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=spdpNVJYLB/Vcpi2FIvZnu7EVWB4/kO/4rDcNA2wvudacQT/We/qyugueJ7Ca1Kci SY8L9mJYTSYWYc1wGpXhTI2UK6GcikePPY16a8v+Nzrmi74ZzUlC3DoB1avnIkjQtF TR+Yp+tT6s0xzO64pJ9E7FlIOoBOWUeiZCT6Hbl8N05ksoGZJfU8vFXpDfj5k556My 8EBMzBtWAdsmMFiakP9EeuR5f6Ve25VYI7mbnl0dVPWMdjZB6QWwpQ+nLL3pV7HaR5 YX28OXtDEzVik25xabjPMkt68wwozSeLQAJXiSbWZ6QIPhBo3K79Y/06/NDpRx0LMt S20GCkIrCleKg== Received: from [172.16.0.134] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TQ4sn1wYGzVrS; Wed, 31 Jan 2024 09:58:21 -0500 (EST) Message-ID: Date: Wed, 31 Jan 2024 09:58:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 7/8] Introduce dcache_is_aliasing() across all architectures Content-Language: en-US To: Dave Chinner Cc: Dan Williams , Vishal Verma , Dave Jiang , linux-kernel@vger.kernel.org, Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arch@vger.kernel.org, Matthew Wilcox , Arnd Bergmann , Russell King , linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, linux-xfs@vger.kernel.org References: <20240130165255.212591-1-mathieu.desnoyers@efficios.com> <20240130165255.212591-8-mathieu.desnoyers@efficios.com> From: Mathieu Desnoyers In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8ACADC0019 X-Rspam-User: X-Stat-Signature: rar7bzxeaxcrg4g37bya7xm91eba4d6x X-Rspamd-Server: rspam01 X-HE-Tag: 1706713102-276623 X-HE-Meta: U2FsdGVkX18PRyWDDIHu46jXAvzpfb3c937b0yBKAJoV3tatL5uFKxb3P2C7hx5Y4giA1x7iZOm58/+r0u7X8wvTnjfBJW2nES/UQeZEFanptf4rldcHWJ09Mi5R3w8yCD/oFsmBslqcRVEUGYVG9e5GK5cqrzvdoaxnUxVy3BrnbhW02psYCgy5nlCTA8HWBaajlIAzH68GOpLxyU0YfatY0WM9BASfmcKCXDdzWw8NcMq5D9WfxcVoG65vy+x0xuISqIqIpTXJ0UBH3w7BrZd+EuLA/V5HFpjZpJkGqjUhpjzTP4Pi3Hx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sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2024-01-30 21:48, Dave Chinner wrote: > On Tue, Jan 30, 2024 at 11:52:54AM -0500, Mathieu Desnoyers wrote: >> Introduce a generic way to query whether the dcache is virtually aliased >> on all architectures. Its purpose is to ensure that subsystems which >> are incompatible with virtually aliased data caches (e.g. FS_DAX) can >> reliably query this. >> >> For dcache aliasing, there are three scenarios dependending on the >> architecture. Here is a breakdown based on my understanding: >> >> A) The dcache is always aliasing: >> >> * arc >> * csky >> * m68k (note: shared memory mappings are incoherent ? SHMLBA is missing there.) >> * sh >> * parisc > > /me wonders why the dentry cache aliasing has problems on these > systems. > > Oh, dcache != fs/dcache.c (the VFS dentry cache). > > Can you please rename this function appropriately so us dumb > filesystem people don't confuse cpu data cache configurations with > the VFS dentry cache aliasing when we read this code? Something like > cpu_dcache_is_aliased(), perhaps? Good point, will do. I'm planning go rename as follows for v3 to eliminate confusion with dentry cache (and with "page cache" in general): ARCH_HAS_CACHE_ALIASING -> ARCH_HAS_CPU_CACHE_ALIASING dcache_is_aliasing() -> cpu_dcache_is_aliasing() I noticed that you suggested "aliased" rather than "aliasing", but I followed what arm64 did for icache_is_aliasing(). Do you have a strong preference one way or another ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com