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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A01A9C4320A for ; Wed, 18 Aug 2021 15:52:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3502A6101A for ; Wed, 18 Aug 2021 15:52:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3502A6101A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id ADFB28D0003; Wed, 18 Aug 2021 11:52:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A8F408D0002; Wed, 18 Aug 2021 11:52:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 97E0A8D0003; Wed, 18 Aug 2021 11:52:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0223.hostedemail.com [216.40.44.223]) by kanga.kvack.org (Postfix) with ESMTP id 7B4398D0002 for ; Wed, 18 Aug 2021 11:52:47 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 29A2426808 for ; Wed, 18 Aug 2021 15:52:47 +0000 (UTC) X-FDA: 78488644374.30.9A599EE Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf17.hostedemail.com (Postfix) with ESMTP id BF91BF00F743 for ; Wed, 18 Aug 2021 15:52:46 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id A8C8F6103E; Wed, 18 Aug 2021 15:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629301965; bh=vVeI3LiscroXKFqNQkaexJy8prZzkKcFh8YHE/6KTXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qqA52zUDP1nh1QBVinxNq5599/7V41rnCUSxB8fXnl2F6SQp3hF4BNkVVIOSTz+UB 9O/A8TqvdzhqohgNxF0N77HVbgUI/bX9DSFk+/rS9lrfLrUJvJ8DzydTeST7RAQCnN 5p14ag/i6XR09m0rBz+Ek/r9xYAJkFXR/7TrjXQekKmR0Mpny1qAacSawqqZ0ThlgF svZSvvvg3YPXxNEHirQW1zj/2HRsM94qIxO+wygxRX7JHrbVnbZhsVPrTe/Xd3Lu3f KX9ve16noIoU322Atbm+cdYDPMjUSPY5s7ncO8ITgXseiCCRgsp57z0YKWkZLyomma UTDxvSrCsmEAA== Date: Wed, 18 Aug 2021 08:52:45 -0700 From: "Darrick J. Wong" To: Jane Chu Cc: Shiyang Ruan , linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, dan.j.williams@intel.com, david@fromorbit.com, hch@lst.de, agk@redhat.com, snitzer@redhat.com Subject: Re: [PATCH RESEND v6 1/9] pagemap: Introduce ->memory_failure() Message-ID: <20210818155245.GE12664@magnolia> References: <20210730100158.3117319-1-ruansy.fnst@fujitsu.com> <20210730100158.3117319-2-ruansy.fnst@fujitsu.com> <1d286104-28f4-d442-efed-4344eb8fa5a1@oracle.com> <78c22960-3f6d-8e5d-890a-72915236bedc@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <78c22960-3f6d-8e5d-890a-72915236bedc@oracle.com> X-Rspamd-Queue-Id: BF91BF00F743 Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=qqA52zUD; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf17.hostedemail.com: domain of djwong@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=djwong@kernel.org X-Rspamd-Server: rspam04 X-Stat-Signature: syowzjwrngpdyzoaqpdkg1qrsb37nhcd X-HE-Tag: 1629301966-280595 Content-Transfer-Encoding: quoted-printable 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: On Tue, Aug 17, 2021 at 11:08:40PM -0700, Jane Chu wrote: >=20 > On 8/17/2021 10:43 PM, Jane Chu wrote: > > More information - > >=20 > > On 8/16/2021 10:20 AM, Jane Chu wrote: > > > Hi, ShiYang, > > >=20 > > > So I applied the v6 patch series to my 5.14-rc3 as it's what you > > > indicated is what v6 was based at, and injected a hardware poison. > > >=20 > > > I'm seeing the same problem that was reported a while ago after the > > > poison was consumed - in the SIGBUS payload, the si_addr is missing= : > > >=20 > > > ** SIGBUS(7): canjmp=3D1, whichstep=3D0, ** > > > ** si_addr(0x(nil)), si_lsb(0xC), si_code(0x4, BUS_MCEERR_AR) ** > > >=20 > > > The si_addr ought to be 0x7f6568000000 - the vaddr of the first pag= e > > > in this case. > >=20 > > The failure came from here : > >=20 > > [PATCH RESEND v6 6/9] xfs: Implement ->notify_failure() for XFS > >=20 > > +static int > > +xfs_dax_notify_failure( > > ... > > +=A0=A0=A0 if (!xfs_sb_version_hasrmapbt(&mp->m_sb)) { > > +=A0=A0=A0=A0=A0=A0=A0 xfs_warn(mp, "notify_failure() needs rmapbt en= abled!"); > > +=A0=A0=A0=A0=A0=A0=A0 return -EOPNOTSUPP; > > +=A0=A0=A0 } > >=20 > > I am not familiar with XFS, but I have a few questions I hope to get > > answers - > >=20 > > 1) What does it take and cost to make > > =A0=A0 xfs_sb_version_hasrmapbt(&mp->m_sb) to return true? mkfs.xfs -m rmapbt=3D1 > > 2) For a running environment that fails the above check, is it > > =A0=A0 okay to leave the poison handle in limbo and why? > >=20 > > 3) If the above regression is not acceptable, any potential remedy? >=20 > How about moving the check to prior to the notifier registration? > And register only if the check is passed? This seems better > than an alternative which is to fall back to the legacy memory_failure > handling in case the filesystem returns -EOPNOTSUPP. "return -EOPNOTSUPP;" is the branching point where a future patch could probe the (DRAM) buffer cache to bwrite the contents to restore the pmem contents. Right now the focus should be on landing the core code changes without drawing any more NAKs from Dan. --D > thanks, > -jane >=20 > >=20 > > thanks! > > -jane > >=20 > >=20 > > >=20 > > > Something is not right... > > >=20 > > > thanks, > > > -jane > > >=20 > > >=20 > > > On 8/5/2021 6:17 PM, Jane Chu wrote: > > > > The filesystem part of the pmem failure handling is at minimum bu= ilt > > > > on PAGE_SIZE granularity - an inheritance from general > > > > memory_failure handling.=A0 However, with Intel's DCPMEM > > > > technology, the error blast > > > > radius is no more than 256bytes, and might get smaller with futur= e > > > > hardware generation, also advanced atomic 64B write to clear the = poison. > > > > But I don't see any of that could be incorporated in, given that = the > > > > filesystem is notified a corruption with pfn, rather than an exac= t > > > > address. > > > >=20 > > > > So I guess this question is also for Dan: how to avoid unnecessar= ily > > > > repairing a PMD range for a 256B corrupt range going forward? > > > >=20 > > > > thanks, > > > > -jane > > > >=20 > > > >=20 > > > > On 7/30/2021 3:01 AM, Shiyang Ruan wrote: > > > > > When memory-failure occurs, we call this function which is impl= emented > > > > > by each kind of devices.=A0 For the fsdax case, pmem device dri= ver > > > > > implements it.=A0 Pmem device driver will find out the > > > > > filesystem in which > > > > > the corrupted page located in.=A0 And finally call filesystem h= andler to > > > > > deal with this error. > > > > >=20 > > > > > The filesystem will try to recover the corrupted data if necess= ary. > > > >=20 > > >=20 > >=20