Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1078306rdb; Tue, 30 Jan 2024 07:20:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHW6VbjL4HE5IsOUzGV4OF/VtlsxqhJnaun/EoecKCtbhFR8FdKLh+FtomzNbYNelt0jrgP X-Received: by 2002:a17:906:2b05:b0:a36:3324:6e86 with SMTP id a5-20020a1709062b0500b00a3633246e86mr1097532ejg.47.1706628024854; Tue, 30 Jan 2024 07:20:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706628024; cv=pass; d=google.com; s=arc-20160816; b=dFVpSXx/qHtNjXRyqEsyC/2jOI/7Hn9/Mr/SaGYAD8BvspR7gd46GN66lJ96cgMS+E VZ7ncHKXBLEdcMgXw0CSyHsslt3MFPkkgaW3HVXW0Yu9ogoq9n1ipyZ7wsU4qeWrthEn L3eZxTkPPkgM2BCrSo6lnlW2C3EZWdTm5aZ0082nt56Dxz1AQJon1AdIKFmotW3LXucf GGEJgh5M5z3GvhmwtrEMKsGOb4Y2bwAS5OFQdfBikw1//uTYEorBQahG0fih7s9Obu5u Rd8x41++dIUPhRn+4Pq77cTsAZyC4quUhWb1YjpFBjtwcujusBEInCJ2I4HkIGD1TY7O 0How== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=YyeqVaoZi7chl1C/yZ5jTC60PRpSNispTk/DNks7N/w=; fh=O2fZRFno3LJZKFXoYhMGDRpmX9/23EbhDxNB46g3G6k=; b=FjQQZUwi/BilGiXcHLlJrDUOLiC65KTxrp11sDcx7FZRPpSr3sZ6cH50BK3gkR99Jm fjJlrC3C9/nAdmXA3Wo0S4IUHoYRoryWMxa6ikJeZaRdPeXqTEN2xyP3QcmKyNv+QKwV iJynVTIKRpR+ePaEInD+GqXNKSsdQNzv0tikBYs4uldLBGMfX2ePuwWEfTInUndvQbdD tkNJk5b5vVgXZ9nJb/oEhcUnwgUgnmhCYjbA+ZeY4uHmq7e7gzaCMkDALdd1+5jNEnWH IHME+G2CdQJ+2PN/isboUh3ZQzzkNCM+MHlMelrRyj+ITLlbAK0V3M2uO9W2ISNN5/eZ 1SbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=JPxN6dTK; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-44821-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44821-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ca7-20020a170906a3c700b00a35433023desi3475192ejb.921.2024.01.30.07.20.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 07:20:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44821-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=JPxN6dTK; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-44821-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44821-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 731C91F22CDB for ; Tue, 30 Jan 2024 15:20:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69B998121B; Tue, 30 Jan 2024 15:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="JPxN6dTK" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8D6481AD7; Tue, 30 Jan 2024 15:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706628001; cv=none; b=M2QdieCFNK20fQxHwd3wC3HW7VFIZDTclXTHHKsT5HnRkKryr92yS0SJiLDKn+1bMkUDGKsb+3RVFoqKzyPETnE468uZ1+EXk3yGq12M4LFHCf8RDrjPWv1GzyHCcJblbbGEQ/NLv4asDJJsQHF8ISAtzHtUtFjLOhIYQOtczxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706628001; c=relaxed/simple; bh=JcOCpUNYX78olAmn5ygAlWF9kq291PrVVIR9mH3wcsw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=c6PH7obHgvDcEDwtRaKfoulunFERNEQIYOGU478oGbgW9ti8usbhYxC4UjiF69sbdR3fcHAUIOuPV2pwBR9AG29L1corbWCuUsATOu9uWQY57/+pT4oTz+s2k/w30JqqeVeExf6tJTACfv9mCvp4IXQ7I0sWIktWCS/witAcE/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=JPxN6dTK; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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