Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1404912rdb; Tue, 30 Jan 2024 18:48:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0x7BVzzZmxWHI2DezQTSaFbVUzHbfqz6IzpXgaPGhcsZbzzcROZP6euog+O+mHacqq2mf X-Received: by 2002:a17:90a:d90d:b0:28e:84de:66de with SMTP id c13-20020a17090ad90d00b0028e84de66demr418936pjv.19.1706669336179; Tue, 30 Jan 2024 18:48:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706669336; cv=pass; d=google.com; s=arc-20160816; b=XYufD/x22H33jMqtVvuS42bgVURiNRTQa6YTs8p3OnsRYcUp+dQ6Kaanakdm/BMvPE 6qxdSx4AUlYqaQ0xnD7htfUn9WvML67LWY1TKD/5y99zb/YoGieGEMzirorWwNFFizXS zhpS98yWKnoI0QmriHm8XYUNbg13PZSedE8e8RxaVCdgLeainxWE2ZPUGadLD47KIdpO 87Gtp5SZ9rl6rpq8C//+m1nSo67WNoeaAqBezGOrEbaA5cLXPn87KhK6i8LlR/N45k95 ua0GXJgB+C0yvMDl8ST+dyOgB+lJO37FlIOFm0W1b7CWhZof1al+KLeylRuNm1ATfKFo bj2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QXPQ5XtJsAXFNxQJCj+inZTl278RjDiJDDTKJAOYW4w=; fh=K+7pH9mn+Y8uJAhovs716sxkXJM2WajXo2e0juAmMo8=; b=kShN6dwUSriP/KCTTXnl1J2yRQFEk3jKCaCfKYB71dWjVhu/MtNIeCy/YbVM+5F+Qw c4POqFQY9rA9olnSumCpSUmeJ2BdOZwhkheEXkuuYouE7cUzmNAPzXFYZd7XPmGJehNT 6ftHgygG0nsiAc7pBUT44gxIbaqO9Wb4RfiWlDgIRjrAdbKYtT0wCDat7vbXhJVGeTKF HdZb+VM8d1KoAE2UjpntLXUVvmPQ7d3fa0cQsa/kpE1UidE2LJm/jcUjEX3i/OoWG7kX ByqOsATrUM/s5o5ymROHfaIRZIhaIsWUf8AfpC8amdAmjNe9JHXu+GTKeghPjifYckSt G3zQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b="S3+MTq/G"; arc=pass (i=1 spf=pass spfdomain=fromorbit.com dkim=pass dkdomain=fromorbit-com.20230601.gappssmtp.com dmarc=pass fromdomain=fromorbit.com); spf=pass (google.com: domain of linux-kernel+bounces-45689-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com X-Forwarded-Encrypted: i=1; AJvYcCWeVWoxmR504OFUuZap98RdC7jaWXEtqGce2aXZFG4ZjygAD75TZM+CxxDL7tCz65lQXONqgq0bBjmWis6le+vcPyDPcCbUQ45qpB5NHw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u14-20020a170903124e00b001d5f24c1792si8533161plh.367.2024.01.30.18.48.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 18:48:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45689-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b="S3+MTq/G"; arc=pass (i=1 spf=pass spfdomain=fromorbit.com dkim=pass dkdomain=fromorbit-com.20230601.gappssmtp.com dmarc=pass fromdomain=fromorbit.com); spf=pass (google.com: domain of linux-kernel+bounces-45689-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45689-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D6E3328E272 for ; Wed, 31 Jan 2024 02:48:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6B68FBF3; Wed, 31 Jan 2024 02:48:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b="S3+MTq/G" Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99B7DE576 for ; Wed, 31 Jan 2024 02:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706669326; cv=none; b=Wn6cdlSimSNHvPEHmkqxKGrqivOXtvcpsi4TVKBVkGPriqL4qaxBTCUs2x39ce847K0FLJ4GwB5lPfpm2NO8c7KoEXHF8/aSEHsOwHFzURE5l6gqU1cWcn3TRgY/l4TM4nMc5L1Am/qtdSQfxdwsEb6nOLxXJKWm3+UGR2+yb58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706669326; c=relaxed/simple; bh=EQL375dfJ45QKL20tEKFWpifQWW4xKqbP46PsyALWuI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HQ2mOmwdj74df6LIlCZJPeifaJZCNwMdT15Ekr63JXyYn05YmsWrgZ8VNnYrdgn+YeNIjON6sCmWoDMdB/hS4MAwVMp2GYC3EM5mtfpC4K6zmIBMP1NNJphad4orCcdZxRlXgmcSEGnj1fX/JoLQxkI7Z6pdmuGspm7WSH9LAEQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com; spf=pass smtp.mailfrom=fromorbit.com; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b=S3+MTq/G; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fromorbit.com Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6de0ba30994so322617b3a.1 for ; Tue, 30 Jan 2024 18:48:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1706669324; x=1707274124; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QXPQ5XtJsAXFNxQJCj+inZTl278RjDiJDDTKJAOYW4w=; b=S3+MTq/Ght2lQuX59vGnggaJv7UihUGdyd6+qQaW83bSLHHc2JycN25FXsYUBJYYe/ rwUTg0zJ0yWWsLX162/FRaN4OI7RihICJmxPvo7g49J5Zud/2d3HKbHKnzDH0ZvnVPOW NTXaMa8zkwzIGAmkDPRo7MVG3Z7EMAEqB1ea856kuhZIMKzyMeMrmuCGcJqZNKwy6Kdi UzKVv8d0pvxOz4oZEw5bC8zvSJ5DZVXPrtVGy00RVeNwNKM1D0IzH729QgN7jneQ8mp0 4xBnJD3sdESQFw/0ZZITSPLPkd3UCRL5TMW47mjcttkkdiKtW/rrfyg+v1ey5lQhcV4V aKPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706669324; x=1707274124; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QXPQ5XtJsAXFNxQJCj+inZTl278RjDiJDDTKJAOYW4w=; b=EtygKbcmCh34bdWJ+qXN7KSTZSYjWgrbmAiOAyksoS8cwpYBGMxSPcS145tVC7pmIs w+r4VovcLdojomCRWVCrWmYjFkZ64tQ3PVB3m5TmNEfCiDyvdSOnGwmD8Wn7UIi1Y5uP Ifwp0zHcIDpQ6dUzjg4Q9RMFx9rxS8fNop1tS2EC7TqmiGGhfARBJdTMblddBFxA3dsQ /UdWjDaZQjD7joNlNMUZ8eBv/6gj94hqfLMKDdfASKex3vZE8FXxOyuST/8WW4nrHoY8 UbHnlJAxupeqyKSjZSsFjkHEs5i4FD9mz03zfyVVnyZzFYuJpGtP8bI+Mw0sBeh3QRVs Z4Ww== X-Gm-Message-State: AOJu0YyOENmxN6eLZ4PMHySgLkfxOq7pHK84KkcopAKIlj4+r6gAmpJx pxZoNIy1lqb7Pne0wUEjofd2AJ4Fv/e/Zg+JMw6JKrLU0EnxE5/r0RcrjHb5JsY= X-Received: by 2002:a05:6a00:d66:b0:6da:c8b6:6dc8 with SMTP id n38-20020a056a000d6600b006dac8b66dc8mr333189pfv.13.1706669323865; Tue, 30 Jan 2024 18:48:43 -0800 (PST) Received: from dread.disaster.area (pa49-181-38-249.pa.nsw.optusnet.com.au. [49.181.38.249]) by smtp.gmail.com with ESMTPSA id r6-20020a056a00216600b006dbd79596f3sm8582748pff.160.2024.01.30.18.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 18:48:43 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1rV0eW-00HZlT-1P; Wed, 31 Jan 2024 13:48:40 +1100 Date: Wed, 31 Jan 2024 13:48:40 +1100 From: Dave Chinner To: Mathieu Desnoyers 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 Subject: Re: [RFC PATCH v2 7/8] Introduce dcache_is_aliasing() across all architectures Message-ID: References: <20240130165255.212591-1-mathieu.desnoyers@efficios.com> <20240130165255.212591-8-mathieu.desnoyers@efficios.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130165255.212591-8-mathieu.desnoyers@efficios.com> 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? -Dave. -- Dave Chinner david@fromorbit.com