Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp42095pxf; Wed, 24 Mar 2021 20:21:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOIMf3aYlzRxeqo51oWHy2LapI66vZubTFGjGWzBc/kO8UuHT2IB1oPQm9ZAewSLjxjGv2 X-Received: by 2002:a17:907:2112:: with SMTP id qn18mr6881453ejb.220.1616642506165; Wed, 24 Mar 2021 20:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616642506; cv=none; d=google.com; s=arc-20160816; b=L3T5Cy5MT8C4UiY13Z48Vod7dLn1XHFWnNEiPtpu+NoKEFDqXfOWD7RiyhbCFZYzr1 PkzJTjVHrIOgQKaKC3X5ELHNw9jUpDDVq/suxyB6LIIawKcbaGtKzIylPAHvPcVaCvoV y2rECnZjFpWUa+lGDOdDE9+KHKHi3bJWLWicu0EVND3Vq7TEZAAHahttQCg7QAUnILQX Y6EDzjZM1nFEa6HZ7DcKDFz241dhjJW4JwJDuA+f4UfwAko0bfTLjcdjPoWjW5jML+4T iwq1EOYUqaDey5oYq2iMtf3aV7CpRPqCNOLP/WNm/Na+7nwSUDTLhUB3dTsUjC0SRebP Dnxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KQvt0QZpruevF/RHrybH3HAfK2W/yg9qJVCrRJTfvJM=; b=gh5E2OfP9L6QXxPEAwveRxb2LA7guu5h7pUQOopNueHOPZGd49hRwXxvMWAOqi3D5P sFdSeXKjP/1jGEgP2dkI7n8xkeynWt4xcCyb1Qjs6Cfow+QVkPI/oYqsqGPg5vvt8t1K J5ilJo8p0MMFY3noxWxgHUqK77cUr0Z3Qh0pMGGL7jYpQhb9VOCb0j9NFIMrP1TI+5Ez b8z3ra9Im0kn6PND94pOs7bdrj1HtEdtacLbAOV/ACi8sa3LIY23BLFRsuQahqpFaAu8 kVFW9xWCeXFzN44q/P46LrBs+AaTwc25D9AZ0ToKizvFul8G4ISwg1Z3e76YDL9qMD+j zWfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i25si3148213ejv.640.2021.03.24.20.21.24; Wed, 24 Mar 2021 20:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237242AbhCXRj6 (ORCPT + 99 others); Wed, 24 Mar 2021 13:39:58 -0400 Received: from verein.lst.de ([213.95.11.211]:38051 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237143AbhCXRjl (ORCPT ); Wed, 24 Mar 2021 13:39:41 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 1520C68BEB; Wed, 24 Mar 2021 18:39:36 +0100 (CET) Date: Wed, 24 Mar 2021 18:39:35 +0100 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , "ruansy.fnst@fujitsu.com" , Linux Kernel Mailing List , linux-xfs , linux-nvdimm , Linux MM , linux-fsdevel , device-mapper development , "Darrick J. Wong" , david , Alasdair Kergon , Mike Snitzer , Goldwyn Rodrigues , "qi.fuli@fujitsu.com" , "y-goto@fujitsu.com" Subject: Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() Message-ID: <20210324173935.GB12770@lst.de> References: <20210324074751.GA1630@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote: > > Eww. As I said I think the right way is that the file system (or > > other consumer) can register a set of callbacks for opening the device. > > How does that solve the problem of the driver being notified of all > pfn failure events? Ok, I probably just showed I need to spend more time looking at your proposal vs the actual code.. Don't we have a proper way how one of the nvdimm layers own a spefific memory range and call directly into that instead of through a notifier? > Today pmem only finds out about the ones that are > notified via native x86 machine check error handling via a notifier > (yes "firmware-first" error handling fails to do the right thing for > the pmem driver), Did any kind of firmware-first error handling ever get anything right? I wish people would have learned that by now. > or the ones that are eventually reported via address > range scrub, but only for the nvdimms that implement range scrubbing. > memory_failure() seems a reasonable catch all point to route pfn > failure events, in an arch independent way, to interested drivers. Yeah. > I'm fine swapping out dax_device blocking_notiier chains for your > proposal, but that does not address all the proposed reworks in my > list which are: > > - delete "drivers/acpi/nfit/mce.c" > > - teach memory_failure() to be able to communicate range failure > > - enable memory_failure() to defer to a filesystem that can say > "critical metadata is impacted, no point in trying to do file-by-file > isolation, bring the whole fs down". This all sounds sensible.