Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5675954rwl; Thu, 29 Dec 2022 00:46:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXuk07gnRiqLyAQBn9ET4tkPFFEhSUdavtowYMP33K1PewB4RFxs2gcxjPK3RHH4AQ0aT9Uq X-Received: by 2002:a17:906:1c59:b0:7bb:af66:f38c with SMTP id l25-20020a1709061c5900b007bbaf66f38cmr23310491ejg.10.1672303563523; Thu, 29 Dec 2022 00:46:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672303563; cv=none; d=google.com; s=arc-20160816; b=SSOVrwtUP2zQmvUzO5jaCj1NG13CW8zE1kK4qNxfAOdsoiL6jsRvhyEM1Xpux9+YZv Rfazvv7jSHJH0d00RxqAWuu6lmvmzNlaz5+o07jSZt62DHPMnrz0smZm+d/gZl6mgAPa cmjqNSSI1U/x52/1p+Mk6tXhe7fCH+ivmr9Bb+F/yjptf5bKDAkXQT9syS5KquoWYIDn 9n1s4XIobHQgUofKu4ggs+PS7jzX9P5+VAC2zFVKrMt57qJzRLWaMUVs1D69BfrAYlcU 75tnh262jsPdWfNDO5HB+fW8SOj3zlVm6v12xNhlCD0IS6U0n692Qq0kaDifzM2mDR29 BUyg== 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:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=SUSAOyphF+B29lskscxDvTF3FQCewU2rscBGHhh6gm4=; b=TKYlg0ztypk7H7FL99wr1Izc0c2/2h7l3BpIZ3G85xEZ7uXCGsolsstpoaAof9JBTE S410jXgD2zNmZ9a7KqEm8COloONtLEUIhcH7NvJC+GAlq1+55Bv0Caxmwc9/tbnDvxWh IyhWAZLdJgnfed5hskozNjl6qYNOvQo4FOvFq5SsaccrQ2xq5frcwUvzdkAGzheG/UY8 Srqg7JyHhdCZxub8bmqPksRiMRAGX660djO4WeC311kPRuxQg6iWOfHYtEceCZo3IPTG D8904pM/GzAhYd9cGoHc4RIxyk0HpCNijOhjop9B5gqbHNtMvHmPtSTMpYhihN+onwMY Dd4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fujitsu.com header.s=170520fj header.b=FjqWGmTu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a170906794700b007c10276464fsi15789887ejo.24.2022.12.29.00.45.49; Thu, 29 Dec 2022 00:46:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fujitsu.com header.s=170520fj header.b=FjqWGmTu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbiL2IXb (ORCPT + 62 others); Thu, 29 Dec 2022 03:23:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230193AbiL2IX3 (ORCPT ); Thu, 29 Dec 2022 03:23:29 -0500 Received: from mail1.bemta32.messagelabs.com (mail1.bemta32.messagelabs.com [195.245.230.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFD7610A9; Thu, 29 Dec 2022 00:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.com; s=170520fj; t=1672302206; i=@fujitsu.com; bh=SUSAOyphF+B29lskscxDvTF3FQCewU2rscBGHhh6gm4=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=FjqWGmTuFguN7i+NUk81QEUGiW8CeKad7QUINXYTukOPyE5khuoATs0HniXwcpbn2 lIkN8gSvbMAdrQ/XeLdJtQImFVu9vLIR2G/ZwnVNqrdfDnh+c2/L3yRMGlJr4r7JD0 7wfU33sUye7vLx3sikmain6l+oR6dbBr3v0NMxuEDwKuUSvNbCysTYRQvipuN74MAQ nllZfIGy02JtktXivHkXnHSv9lOA6NPcs2yVK/kJCAO16fQKMCjZOoTnZSmqTcKD4i cjMmDbylN42AiqOHv1NgslfvuO3WOINBLNFhdiRivLOnRTLmD5jJ8s5iSwuhX9DYc4 3dJ6bAH6hRHdA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrCKsWRWlGSWpSXmKPExsViZ8ORpFvjtzb Z4PkyfYs569ewWUyfeoHRYsuxe4wWl5/wWezZe5LF4vKuOWwWu/7sYLdY+eMPqwOHx6lFEh6L 97xk8ti0qpPN48SM3yweLzbPZPT4vEkugC2KNTMvKb8igTXj0KuJjAWXJCru/rzC1MC4SLiLk YtDSGAjo0THw4ksEM5iJonLZ68yQzg7GCVeX/rG1MXIycErYCex9OgZMJtFQFXi8cMv7BBxQY mTM5+wgNiiAskSL45+YwSxhQWsJaaufczaxcjBISJQKnHqYxZImFmgWmLi3/NQ85sYJVafmsg MkmAT0JG4sOAvK4jNKeAp8WHlX2aIBguJxW8OskPY8hLNW2eDxSUElCR6G96zQtgVErNmtTFB 2GoSV89tYp7AKDQLyXmzkIyahWTUAkbmVYxmxalFZalFuoYmeklFmekZJbmJmTl6iVW6iXqpp brlqcUluoZ6ieXFeqnFxXrFlbnJOSl6eaklmxiBEZZSzLZqB+OvZX/0DjFKcjApifJm2K1NFu JLyk+pzEgszogvKs1JLT7EKMPBoSTBG+YNlBMsSk1PrUjLzAFGO0xagoNHSYR3Hkiat7ggMbc 4Mx0idYpRl2Ntw4G9zEIsefl5qVLivI6+QEUCIEUZpXlwI2CJ5xKjrJQwLyMDA4MQT0FqUW5m Car8K0ZxDkYlYd54H6ApPJl5JXCbXgEdwQR0xIdDK0GOKElESEk1MEm8KLrSwRd5fEkt370To hWHo/5HPZxkqnrqiLOTl0fbgbl7rnCtSVQR7bp39vjlDen8NrWLNe7v6phVsX4/5467lpYurr fvTxeW2TpRkNG961pboNDhKXe/uHH6GLIqiDi/27oiTdhj88Se2PDDBhNZU3adE2K/bfdO/g7 jmsTQydwsZ24krJzLzZ6y9N/52SU7mBx00/PL1ylJzStme+PpeMnq5rzAlAnmWZXBnrPmri9T yhZmUp7zZ4IHg9Dhm1l1b25q/Kk2+smw5CK34NMnU+WqqiQvNDpH+kQ6rrlmJia1IO36FYv8r t7+68Y1l2NdV6nGme6eYhuhuHud2hkBuQkfryyceaGt3WLjOiWW4oxEQy3mouJEAD4S2ja3Aw AA X-Env-Sender: ruansy.fnst@fujitsu.com X-Msg-Ref: server-9.tower-587.messagelabs.com!1672302204!842!1 X-Originating-IP: [62.60.8.98] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.101.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12139 invoked from network); 29 Dec 2022 08:23:24 -0000 Received: from unknown (HELO n03ukasimr03.n03.fujitsu.local) (62.60.8.98) by server-9.tower-587.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 29 Dec 2022 08:23:24 -0000 Received: from n03ukasimr03.n03.fujitsu.local (localhost [127.0.0.1]) by n03ukasimr03.n03.fujitsu.local (Postfix) with ESMTP id 517BD1B1; Thu, 29 Dec 2022 08:23:24 +0000 (GMT) Received: from R01UKEXCASM126.r01.fujitsu.local (R01UKEXCASM126 [10.183.43.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by n03ukasimr03.n03.fujitsu.local (Postfix) with ESMTPS id 4604B7B; Thu, 29 Dec 2022 08:23:24 +0000 (GMT) Received: from [10.167.201.145] (10.167.201.145) by R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 29 Dec 2022 08:23:20 +0000 Message-ID: <5bbe8d22-0cdb-9c6f-d568-c183c4bd7dbe@fujitsu.com> Date: Thu, 29 Dec 2022 16:23:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2 0/8] fsdax,xfs: fix warning messages To: Dan Williams , , , CC: , , , References: <1669908538-55-1-git-send-email-ruansy.fnst@fujitsu.com> <638aa4a298879_3cbe0294ba@dwillia2-xfh.jf.intel.com.notmuch> From: Shiyang Ruan In-Reply-To: <638aa4a298879_3cbe0294ba@dwillia2-xfh.jf.intel.com.notmuch> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.167.201.145] X-ClientProxiedBy: G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) To R01UKEXCASM126.r01.fujitsu.local (10.183.43.178) X-Virus-Scanned: ClamAV using ClamSMTP X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/12/3 9:21, Dan Williams 写道: > Shiyang Ruan wrote: >> Changes since v1: >> 1. Added a snippet of the warning message and some of the failed cases >> 2. Separated the patch for easily review >> 3. Added page->share and its helper functions >> 4. Included the patch[1] that removes the restrictions of fsdax and reflink >> [1] https://lore.kernel.org/linux-xfs/1663234002-17-1-git-send-email-ruansy.fnst@fujitsu.com/ >> ... >> >> This also effects dax+noreflink mode if we run the test after a >> dax+reflink test. So, the most urgent thing is solving the warning >> messages. >> >> With these fixes, most warning messages in dax_associate_entry() are >> gone. But honestly, generic/388 will randomly failed with the warning. >> The case shutdown the xfs when fsstress is running, and do it for many >> times. I think the reason is that dax pages in use are not able to be >> invalidated in time when fs is shutdown. The next time dax page to be >> associated, it still remains the mapping value set last time. I'll keep >> on solving it. > > This one also sounds like it is going to be relevant for CXL PMEM, and > the improvements to the reference counting. CXL has a facility where the > driver asserts that no more writes are in-flight to the device so that > the device can assert a clean shutdown. Part of that will be making sure > that page access ends at fs shutdown. I was trying to locate the root cause of the fail on generic/388. But since it's a fsstress test, I can't relpay the operation sequence to help me locate the operations. So, I tried to replace fsstress with fsx, which can do replay after the case fails, but it can't reproduce the fail. I think another important factor is that fsstress tests with multiple threads. So, for now, it's hard for me to locate the cause by running the test. Then I updated the kernel to the latest v6.2-rc1 and run generic/388 for many times. The warning dmesg doesn't show any more. How is your test on this case? Does it still fail on the latest kernel? If so, I think I have to keep on locating the cause, and need your advice. -- Thanks, Ruan. > >> The warning message in dax_writeback_one() can also be fixed because of >> the dax unshare. >> >> >> Shiyang Ruan (8): >> fsdax: introduce page->share for fsdax in reflink mode >> fsdax: invalidate pages when CoW >> fsdax: zero the edges if source is HOLE or UNWRITTEN >> fsdax,xfs: set the shared flag when file extent is shared >> fsdax: dedupe: iter two files at the same time >> xfs: use dax ops for zero and truncate in fsdax mode >> fsdax,xfs: port unshare to fsdax >> xfs: remove restrictions for fsdax and reflink >> >> fs/dax.c | 220 +++++++++++++++++++++++++------------ >> fs/xfs/xfs_ioctl.c | 4 - >> fs/xfs/xfs_iomap.c | 6 +- >> fs/xfs/xfs_iops.c | 4 - >> fs/xfs/xfs_reflink.c | 8 +- >> include/linux/dax.h | 2 + >> include/linux/mm_types.h | 5 +- >> include/linux/page-flags.h | 2 +- >> 8 files changed, 166 insertions(+), 85 deletions(-) >> >> -- >> 2.38.1 >> >> > >