Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1141204pxb; Wed, 6 Apr 2022 09:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0LzK/gT+IVltVZ48iIxO+ebdzeto9tuMZABSxqluxp+yTaLloKx1AWdJQCvFCTSRxP0Hy X-Received: by 2002:a17:90b:1a8a:b0:1c7:c60b:f12 with SMTP id ng10-20020a17090b1a8a00b001c7c60b0f12mr10807360pjb.139.1649263182941; Wed, 06 Apr 2022 09:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649263182; cv=none; d=google.com; s=arc-20160816; b=q+sz1Ewpo8Zz9RkZdHbO8EPi5vGm5yvp0gcLqmn2n6/xHJ8/YWzMRIZlhEUu9g8o2r aGCMijWV36Q4AaUo8c1Cgu48/N0bzDhesulqsls/PgyU/20Rat3RhXVXNot9SsUOx2gk f8NC+C08ydamH216LsmMx/WjpFRpXFbAH/dKjIZ+0aqv5PLnr7EGAFo4Eeg4Mw2thdo+ InHrkcIMwXBev8srLicaKmZUZ2seKTkvKFAKQBmSFOdlTYEYSBO0c/0wxbB0Qju0p4Wo GQ09NQPayFnnE8lyO9ORtEGng3ouQpuv74PIH1x4+wuGVZpqFUlJmXvM/76lb/q8nyDV tkbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GpAHmbeaClOABfDOq4xnFecCsaGHIekoRhkFacwUlXs=; b=ACYySYQAQLZpuhXmlrQvD/Z4tabl6rHUHEVZbhcA7MmgwaOivBTEU7z5HLuANvFXlp mUbSSTpms+XXzhseFV+RI2Srah1OlfuZYJEnYOUHxjmD+XmxWuozuIW6Btbz3ses6XJ8 DX4EjlQ2cMVCd24YBFxV9spO+41n6YIlb7Wpn0gE5mRoTK3xkrVfocMC9i7Fb58LRxBD e1IiMYetZLls1XzlY0kpcJcwtRoMex7g4p60cVfsZlNv3HdGz8mc63O9g8wMlw9mR/yX p5WZ9/GmXxBiLfsONvk2IKUam7ijndlinUmzubFRIKCPjmrdcadpWB+m3VjTsRK9yNLC zVpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=DTGX679O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i190-20020a626dc7000000b004fae7a23a5fsi14671158pfc.146.2022.04.06.09.39.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:39:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=DTGX679O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 19678E9CBB; Wed, 6 Apr 2022 09:32:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237706AbiDFQdu (ORCPT + 99 others); Wed, 6 Apr 2022 12:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238367AbiDFQc7 (ORCPT ); Wed, 6 Apr 2022 12:32:59 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C201FAA29 for ; Tue, 5 Apr 2022 18:22:59 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id l4-20020a17090a49c400b001c6840df4a3so1273685pjm.0 for ; Tue, 05 Apr 2022 18:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GpAHmbeaClOABfDOq4xnFecCsaGHIekoRhkFacwUlXs=; b=DTGX679OZ1qKODLoERzJPs9u5x0CQ7BYYUpa2ouElTHNgAKbPpKoCPRTExB81qQ2US 94dbMKZq/YmOeyWFp2JbpnvKA0jH4iSww8lz1A4p4C92e1wGL/hPVnaXi1g1ADkUAp6P RNhUno+35Z8wecDtsPPgH+m4yLNmQXPQLqx3+K7wiP9W7njPgLJqsTd3C7bY0GOn3iL4 DU1KcaQsM6ar/F3C6nMFoc7ou3I3CvJEUZey03r8p0CmPUzHrg/bmaACtqdejQJ4iant V/TCZoYpa1rMEzqemePJkaBICzpAtqcCLdOPBkkwkXyPjciIJJUh7pdnmRJymCr3P0SZ hABQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GpAHmbeaClOABfDOq4xnFecCsaGHIekoRhkFacwUlXs=; b=o/4AdjyKWi3YKrLDoHtZqOOMp0Zaikz1Mr5aimkeD+wRhL/MXrZMT4U5zyOSHBxXRB bp3hMyozrW2hB8l+rDX1Tj5aiYg59j+0KblTubzdh3Q4SLWSE9kIrArVR4i+75uNtgsz 3e68SMGC+0q+KV45zatGDo3FOEyg8rUhsffTxQZ+NWBb3fSog5Z7rGV6gttctBx4fuqf mN2T9v5N5kFr9MG+iDSE++WosAypbzuyIW/xuVvUwMXsrf6Wq7QKgmIeWKr0SxJyBvJy QErD8grE2t4L2WPyxNtQcfHJx/mDDNIct4EExz0m99pKb/o5hB9ejdt4N/YcgpKr2Dj8 3YsA== X-Gm-Message-State: AOAM531FrfTiBN9b1WrvMZS5LQQO3j+0yYt2B+LRAITL1tZ1SXdWRMP2 g6Bsnp5MOzTlXit5urW8VUSUCeL1N2Y884W3Wvo2H6aIvfU= X-Received: by 2002:a17:902:d512:b0:156:b23f:ed62 with SMTP id b18-20020a170902d51200b00156b23fed62mr6252643plg.147.1649208179456; Tue, 05 Apr 2022 18:22:59 -0700 (PDT) MIME-Version: 1.0 References: <20220227120747.711169-1-ruansy.fnst@fujitsu.com> <20220227120747.711169-2-ruansy.fnst@fujitsu.com> <4fd95f0b-106f-6933-7bc6-9f0890012b53@fujitsu.com> <15a635d6-2069-2af5-15f8-1c0513487a2f@fujitsu.com> <4ed8baf7-7eb9-71e5-58ea-7c73b7e5bb73@fujitsu.com> <20220330161812.GA27649@magnolia> In-Reply-To: From: Dan Williams Date: Tue, 5 Apr 2022 18:22:48 -0700 Message-ID: Subject: Re: [PATCH v11 1/8] dax: Introduce holder for dax_device To: Jane Chu Cc: "Darrick J. Wong" , Christoph Hellwig , Shiyang Ruan , Linux Kernel Mailing List , linux-xfs , Linux NVDIMM , Linux MM , linux-fsdevel , david Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Tue, Apr 5, 2022 at 5:55 PM Jane Chu wrote: > > On 3/30/2022 9:18 AM, Darrick J. Wong wrote: > > On Wed, Mar 30, 2022 at 08:49:29AM -0700, Christoph Hellwig wrote: > >> On Wed, Mar 30, 2022 at 06:58:21PM +0800, Shiyang Ruan wrote: > >>> As the code I pasted before, pmem driver will subtract its ->data_offset, > >>> which is byte-based. And the filesystem who implements ->notify_failure() > >>> will calculate the offset in unit of byte again. > >>> > >>> So, leave its function signature byte-based, to avoid repeated conversions. > >> > >> I'm actually fine either way, so I'll wait for Dan to comment. > > > > FWIW I'd convinced myself that the reason for using byte units is to > > make it possible to reduce the pmem failure blast radius to subpage > > units... but then I've also been distracted for months. :/ > > > > Yes, thanks Darrick! I recall that. > Maybe just add a comment about why byte unit is used? I think we start with page failure notification and then figure out how to get finer grained through the dax interface in follow-on changes. Otherwise, for finer grained error handling support, memory_failure() would also need to be converted to stop upcasting cache-line granularity to page granularity failures. The native MCE notification communicates a 'struct mce' that can be in terms of sub-page bytes, but the memory management implications are all page based. I assume the FS implications are all FS-block-size based?