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 0FB38C46CD2 for ; Tue, 30 Jan 2024 15:20:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4ED0B6B0075; Tue, 30 Jan 2024 10:20:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 49D1F6B007D; Tue, 30 Jan 2024 10:20:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 365BE6B007E; Tue, 30 Jan 2024 10:20:02 -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 278466B0075 for ; Tue, 30 Jan 2024 10:20:02 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E0B3DA0831 for ; Tue, 30 Jan 2024 15:20:01 +0000 (UTC) X-FDA: 81736337802.13.9117F87 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf21.hostedemail.com (Postfix) with ESMTP id 0A0961C001A for ; Tue, 30 Jan 2024 15:19:59 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=JPxN6dTK; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf21.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706628000; a=rsa-sha256; cv=none; b=dp3Ah3OihbVabENBCwcYy1BSsfeIS0KeLbv6k4gL+GWM8kOJzvT9ws0foQ6hZ0Wzw+oJjR yEvW0/amhzKOPeyFf+BoHZkFT/eHrgoF3tRpoYajsivjAfxUnN8HfPKiLbecHuG77/Gzq0 ivhU1OWfq4GUh0oBNEXmg9ft9TwVBRs= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=JPxN6dTK; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf21.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706628000; 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=YyeqVaoZi7chl1C/yZ5jTC60PRpSNispTk/DNks7N/w=; b=BRf2IBr4tYHvcH83tHOybdtNNFxRylJqOnEM0CEtKzoEm75IFs1DlRYj8FefKGQE+veAaD bhYN2td28NlPWgVim/yu1VRLiHgSWfRhctlzvFykZqZMf+Fp43qXL6U0I/rShjZYkvJa9V v2qckEtVtAvAnsG/KWWB/Hk9RmhXSkI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706627999; bh=JcOCpUNYX78olAmn5ygAlWF9kq291PrVVIR9mH3wcsw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=JPxN6dTK5Q/bxQsHTEY7XK3l9oczuiVZ8vLxKQcJxa2mwxLnyRXFfZ0eMzcgww5Xf 18w3qMdFKykJmcWmlvPKFEkJKtpjVu543M1cpvx+Q62f5ni7hbSq213PHQfS2Ijoue yyGSjYKH/spBUmO+wADEcwcyKcVGmEG4aGWcaMg7iQENaKg4UU6p1UOfGPMJwz2Z5t xpS+TLWvlBjCul4Sh2Ewv7LTPEOaPlaluyTeYEqnBosrSALyZWaBpqztSwsGuS7Ss2 gR4PHzgCZc20LNxisnTqnLhEtlcIkgleQSh4X+V5fRCoYhl6ul2Ar/s8mKocJiey7O 5Jg5oRgFCWEGA== 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 4TPTPB6JR9zVj1; Tue, 30 Jan 2024 10:19:58 -0500 (EST) Message-ID: Date: Tue, 30 Jan 2024 10:19:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 7/7] xfs: Use dax_is_supported() Content-Language: en-US To: Dave Chinner Cc: Dan Williams , Vishal Verma , Dave Jiang , linux-kernel@vger.kernel.org, Chandan Babu R , "Darrick J . Wong" , linux-xfs@vger.kernel.org, Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arch@vger.kernel.org, Matthew Wilcox , nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org References: <20240129210631.193493-1-mathieu.desnoyers@efficios.com> <20240129210631.193493-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-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0A0961C001A X-Stat-Signature: s8ueo78zmgmk13cpgeqdnw7girkhjwk3 X-HE-Tag: 1706627999-640075 X-HE-Meta: U2FsdGVkX1/7h0xY3rzm4uGJdycWew6idfh+nHYv3sYReqw6xUAC3CmdpVm9BIKyo/qXtMxOI26DzXnv/q4k34LNBxN89+7PJF7nPi0tRAnpiG8kF3lfbzBVeLzZd4W9hnxqtHXULiLoOWZ2ruj8qzV6nBiHqQt0JFhlKOJbDM1iRcB35wkT22ng9Q7k+DfGe1J9sjI575D1Rci8GKqGuYjHx90Mz/wryrT2BTmR2guXkDOHNw/oJgPoaweordag2RbiJbiQrz4vvK1QOxm6MaeZz1qUWkgo/uMDQX9BLSDmUV3mKhYGaw1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ec0ly+BLg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2024-01-29 21:38, Dave Chinner wrote: > On Mon, Jan 29, 2024 at 04:06:31PM -0500, Mathieu Desnoyers wrote: >> Use dax_is_supported() to validate whether the architecture has >> virtually aliased caches at mount time. >> >> This is relevant for architectures which require a dynamic check >> to validate whether they have virtually aliased data caches >> (ARCH_HAS_CACHE_ALIASING_DYNAMIC=y). > > Where's the rest of this patchset? I have no idea what > dax_is_supported() actually does, how it interacts with > CONFIG_FS_DAX, etc. > > If you are changing anything to do with FSDAX, the cc-ing the > -entire- patchset to linux-fsdevel is absolutely necessary so the > entire patchset lands in our inboxes and not just a random patch > from the middle of a bigger change. Sorry, I will Cc linux-fsdevel on all patches for the next round. Meanwhile you can find the whole series on lore: https://lore.kernel.org/lkml/20240129210631.193493-1-mathieu.desnoyers@efficios.com/ [...] > > Assuming that I understand what dax_is_supported() is doing, this > change isn't right. We're just setting the DAX configuration flags > from the mount options here, we don't validate them until > we've parsed all options and eliminated conflicts and rejected > conflicting options. We validate whether the options are > appropriate for the underlying hardware configuration later in the > mount process. > > dax=always suitability is check in xfs_setup_dax_always() called > later in the mount process when we have enough context and support > to open storage devices and check them for DAX support. If the > hardware does not support DAX then we simply we turn off DAX > support, we do not reject the mount as this change does. > > dax=inode and dax=never are valid options on all configurations, > even those with without FSDAX support or have hardware that is not > capable of using DAX. dax=inode only affects how an inode is > instantiated in cache - if the inode has a flag that says "use DAX" > and dax is suppoortable by the hardware, then the turn on DAX for > that inode. Otherwise we just use the normal non-dax IO paths. > > Again, we don't error out the filesystem if DAX is not supported, > we just don't turn it on. This check is done in > xfs_inode_should_enable_dax() and I think all you need to do is > replace the IS_ENABLED(CONFIG_FS_DAX) with a dax_is_supported() > call... Thanks a lot for the detailed explanation. You are right, I will move the dax_is_supported() check to xfs_inode_should_enable_dax(). Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com