Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1096349pxb; Tue, 14 Sep 2021 16:37:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeFzcJuwLaXcOJQUaTzbMsjA59PNMSv6ipafxfSphkt9B2fjyPCaNo64E2KsVGai/RRhER X-Received: by 2002:a05:6512:22d1:: with SMTP id g17mr14743735lfu.637.1631662637479; Tue, 14 Sep 2021 16:37:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631662637; cv=pass; d=google.com; s=arc-20160816; b=D+zFtlVHTixwiIvQuwEKyxnnzS5m4uYBfm5du44RUklnkO+XVdB0nMwDI9VfL1Nl76 OqtbMp8pjp9UITpbRP/wfzEiTPq2O+AtcNT+WgA1TTOXNBhLjPNn+/dr5IL7/ighTVFf YP1E8Owa4eeFesD1/CeLClvUzw5kpF0ywuPC/ysrmoybW7oILLF3Lect19uETkoWrGAM OfL7r3unBW0uMGbXTZHcu8t5YJXP1m7mLCfTeJPiXwW1BEGc+IRfsohWotE1qebZfeLT WrycbvkQGYxCJt0IQ0SCrxGjVlOq/jimIYZ3eSIHhRqCvv055wY7CVpE8KZgsP3kYggo SD6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from :dkim-signature:dkim-signature:dkim-signature; bh=80MAg8L66JzOnOeDAvbnTS0pCogozFh2GEI3z+1X84E=; b=yox867hR09QVfjZThuh70HlTKw43vw7PEfkEYOwMTiE8QPYYr+exAy1dsMbZeJM62Z G/yZnKGuQULDkT4s5/oAUuKpVjvA8XQ9dx7Sf35S3JOegIdq/r5C5O3WDr7ES6qnCDoW exXWIZXy2I5Sm36b0TU4SCQw/fJb0wtXn3nyVElp2Jl1WmhXFTls6rizbTS8EyKWcamQ 062Cr6tYmvfSZq30t36mG8qwID2Er4Vrb8hi2Sg/3D6vCsu1OatvYTVmZCpEyNd+GSV0 bUghyKQl4bBW3Os3QC3E8mfElgLBStRNQk0woMn7e85dxInqBACuXVwCrYcgIMMhUiI1 LRlg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ydABs0LK; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=dsPzYAsk; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="OZloXd/g"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l25si502802lfp.485.2021.09.14.16.36.50; Tue, 14 Sep 2021 16:37:17 -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; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=ydABs0LK; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=dsPzYAsk; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="OZloXd/g"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236052AbhINXdz (ORCPT + 99 others); Tue, 14 Sep 2021 19:33:55 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:4872 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235947AbhINXds (ORCPT ); Tue, 14 Sep 2021 19:33:48 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18EKxO5Z017546; Tue, 14 Sep 2021 23:31:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : mime-version; s=corp-2021-07-09; bh=80MAg8L66JzOnOeDAvbnTS0pCogozFh2GEI3z+1X84E=; b=ydABs0LKRDLIKWdMB75Dm3RJRLyLYxd7iKbr6Fq5i7aRpOjuW7WQgwt6Q3SIQ6XYodm3 WcjrbauJI12kdTQY9dUIi75mw0DCt9eWuiHpIxswENpM1YZ5q+RlRhE6/pE2PxJwLG/C yAsOpYQ/1H4yILzDdNFvM44kyyCx+RanGQ+JyTVlGSkfuL21lYaQ5UR8awc8LMIuy/yg yb1edIWLId0TNMxomK1kMVqBod6ti1cj5K/FhtTI0x2cCCRB3r6We7tXnkcSkry71FNE 7xbP18fRzt4kTIR8ZnGtfImUtaNT/O0LK4OCJuE07vpU1pPaRpFVtgBdPZkTh2CK6jMU OA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-type : mime-version; s=corp-2020-01-29; bh=80MAg8L66JzOnOeDAvbnTS0pCogozFh2GEI3z+1X84E=; b=dsPzYAskcFA98FjoOPvOQsSP2H1i6XlRKJ8kZ94cZqrJyc4kOP1xl8czceNiXS8ktLpl tkbrwO9VrSmNmlqQQ76ozqJ15M1/rtUY1KiRd2ok7M+q0J94SEG7TWBTFvDv7n6LZmD+ 5vCnJCSB2Ws3jOBCQVHlSCybsqbJfm0otGyIKRFeBqCxz7L+bh+g+yuJ+sRyb13/x1/m RTYsCJTq/RpGSWcDGhjNFZJcbv90Za8QguvXiDFlekXImeCVnqjd6dtb7K6u++6MDsgs 46ZXC+ADDiA+WRQ0OrBOwMJWfdB6aEUz9WURzq7LvS9IrdSEOLK3NkswLpuO+5TKzb79 VQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3b2p8tb5hk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Sep 2021 23:31:55 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18ENUh5G075975; Tue, 14 Sep 2021 23:31:54 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2174.outbound.protection.outlook.com [104.47.58.174]) by aserp3020.oracle.com with ESMTP id 3b0m970nqr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Sep 2021 23:31:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QghBUs2QiEGqzYNf0bCTXrkY/mlAR1dW/6h4dJSBf9JigVJz3GKmxVZjIkPl5iaMMqLmuJB7lnv4v9DElVixu8YNz3NscPgcO1cqbwr2ZJrn+pULyjxNZBA7y2QMKVi8Gu5hWyCxhkng0ERC7/w2/gkFo4c7tHVkQj/pj8fuamrPKZipj26belL0LULtKG0CSg6DMuXoR9KXsx8dqWxhEPLjvVOuHTKiWqMtCmPhJOt+q6VxuNVKT3X8KVytz54xEgEAMJJm4Ck9BO4+Lohiy0mmRInZ2EKGUOpOqKyidn8+wZRD/1+PIH70ccPdd14sepARTbxLlY07GXzsqT8zaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=80MAg8L66JzOnOeDAvbnTS0pCogozFh2GEI3z+1X84E=; b=jalqvvxAciVmC34LT7DKj4oieMhDDpuoXB7KqtO6bbkqP3Iw9zmGw/Lf8HAJMV1WH3OtNpX/VGblRFTTpfxzfEMk8kPsRQ2KT7y4Myr9q/JH9+dA2Vu5JextKWAjO5JLr3h5Ta7O1uvCNE4YkBpVkCF7ZfDaglgCUAMDzbZTD6ioaOfOmpRzS6svx3vICZpGm6avwcUZBgLD9KIgaNS1mBZO5qCqfG31H04A9BCuKqDoLGLD7ImV5iA8kCF1s84jZYQDCknpFb30aZo9vzxhtBeYCi/FiLA29bSOl0ivW5p70tNx7WiO3S3CzlULVd53LoWwWX7BlNYi3/G1f2LQDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=80MAg8L66JzOnOeDAvbnTS0pCogozFh2GEI3z+1X84E=; b=OZloXd/gd1WRW2GPx3uzvorjFjKjg/VFha0xzVx0w10g7bf5n2HNspmoucnuVO50rgfED0UI+ewY4Z5a94ApRFGD05BKE8MxHYS3UHU+YGxWFiUx9BWNZEgAgqBILoXXqpdsSK1wDU//J7zVoGOev2t/8Juky9AbXPoPWrX9DTo= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=oracle.com; Received: from SJ0PR10MB4429.namprd10.prod.outlook.com (2603:10b6:a03:2d1::14) by BY5PR10MB4035.namprd10.prod.outlook.com (2603:10b6:a03:1f8::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Tue, 14 Sep 2021 23:31:52 +0000 Received: from SJ0PR10MB4429.namprd10.prod.outlook.com ([fe80::401:1df2:3e9a:66c]) by SJ0PR10MB4429.namprd10.prod.outlook.com ([fe80::401:1df2:3e9a:66c%5]) with mapi id 15.20.4500.019; Tue, 14 Sep 2021 23:31:52 +0000 From: Jane Chu To: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, ira.weiny@intel.com, viro@zeniv.linux.org.uk, willy@infradead.org, jack@suse.cz, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 0/3] dax: clear poison on the fly along pwrite Date: Tue, 14 Sep 2021 17:31:28 -0600 Message-Id: <20210914233132.3680546-1-jane.chu@oracle.com> X-Mailer: git-send-email 2.18.4 Content-Type: text/plain X-ClientProxiedBy: SN4PR0601CA0008.namprd06.prod.outlook.com (2603:10b6:803:2f::18) To SJ0PR10MB4429.namprd10.prod.outlook.com (2603:10b6:a03:2d1::14) MIME-Version: 1.0 Received: from brm-x62-16.us.oracle.com (2606:b400:8004:44::1b) by SN4PR0601CA0008.namprd06.prod.outlook.com (2603:10b6:803:2f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Tue, 14 Sep 2021 23:31:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22ee5114-2327-409f-7051-08d977d7d506 X-MS-TrafficTypeDiagnostic: BY5PR10MB4035: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KWiNMoHTBVP0LgNerEviq6uif9Z6onHAKP4QqHllEPPm3KtpYgk6DrgORLjAphlzBndnvLuDetRFsK6knfvhe7VVcIMuee+Hlntbh+KXkzSt2ctpA8SOwNnb/Op4iIEEllzHHS6FuZX64EObQVfOA10RjjwC73EEU27wpMeIpaBXuWAtDibxhECewoPa9EjYcJirSMnLf1QnVk4znrH/6mRRHja8DHXMdmijdIf7kgUCzX09rFsrlrej3cRPwBUr92zU52GN/Wc9Y6Bif6Pq0QWku9REKF0/zNrodUVEmEPqsc08z8IMceOmfLFQSoKaxWynOm/5F+HxrHTp9UwlSOUPKGHJWv8sGUyKeZ2RWCVNkExtkWmJgQEmVjeQa6waL6eQCo2YY+7xZtbeda3gerYfyve707KThD8imTVd57mvD1en4c3Bl1O6SIFQqFq6R6P6nTcrPMXzTkezukSSrDVvTRe5eNOROgYithRZOJiPaJWapLfX8P/VZ+ETapXNJjuevHzwFPcugNIy4kkE+Ci5In7YPQa90axAF2I/sBwXpnvAJr0A3QtczzIHRzzeNazhGSkEQazNaz74x1QYmOiLLhge6+ZR5ljQAecVPUlvFhR+yc4nA+FpBDojBJl2Un2D7UnkpvgdWbkwKOj2TKFIab5n1eNQCWDEw2i+wxE9ebMOsWnBLI0WiPgZWDzk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB4429.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(396003)(366004)(136003)(39850400004)(346002)(66946007)(66476007)(921005)(1076003)(7416002)(66556008)(52116002)(7696005)(36756003)(316002)(5660300002)(186003)(8676002)(38100700002)(8936002)(2906002)(83380400001)(2616005)(6666004)(44832011)(478600001)(4744005)(86362001)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?wnlmcZJ7ZFkrYhCnNdRlUf8OcfEMhvFGPTaV0Jc6zF7K3gNFhW2Bv95+L2jO?= =?us-ascii?Q?wD4WTQVO8WpL225e0ZMboPYVuHM5MJv9Iy9LZzh0iGPVdXa5DkgkpJCw0ec+?= =?us-ascii?Q?zCUp56E4QrtArCT3kChUEWDFBwIYFEDHtC0t3teE3pU09dzlBxZV3oHc3VJ5?= =?us-ascii?Q?l92/VugMSAX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15cQEB5VnyG+ts?= =?us-ascii?Q?Sa9CNH5jqWze6BdaC3u3OjtyK6EheSzCFaVsXeb1PjAOFT+qZfMB69czFvTI?= =?us-ascii?Q?YKYrrvW+/mHo+PagfrZNhjOgSLJdgn5RQWQzDyujC/n8r9pwzHYe21HxD1vi?= =?us-ascii?Q?huzOolPJfu9IsCmDvlA5qsatnnEHaPg/GIVmNP4y3T2kyR1EVAvvJu4l7EGM?= =?us-ascii?Q?lV6+tYeJsS7Gxrnegk+ks4sI3QsLcMFVL5zdyaMQvyovQOGlYD/XU0CBXStM?= =?us-ascii?Q?ez019J+dC/3R0oRejXahoPKBaMEXGlicRTKnKrfFS7R7+w=3D=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22ee5114-2327-409f-7051-08d977d7d506 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4429.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2021 23:31:52.7170 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GdkX3hkbU/qlByG4/QGwp7kpFUpNt/rjmkjSw6D7Yw8ySPNSATBZ8/XfMFSWpZiOqPbslFIq0DVDWgfaqyBlBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB4035 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10107 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109140134 X-Proofpoint-GUID: YEQ1b0TxBYjfL_zVfTXUs2z9-RHv9yI4 X-Proofpoint-ORIG-GUID: YEQ1b0TxBYjfL_zVfTXUs2z9-RHv9yI4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If pwrite(2) encounters poison in a pmem range, it fails with EIO. This is unecessary if hardware is capable of clearing the poison. Though not all dax backend hardware has the capability of clearing poison on the fly, but dax backed by Intel DCPMEM has such capability, and it's desirable to, first, speed up repairing by means of it; second, maintain backend continuity instead of fragmenting it in search for clean blocks. Jane Chu (3): dax: introduce dax_operation dax_clear_poison dax: introduce dax_clear_poison to dax pwrite operation libnvdimm/pmem: Provide pmem_dax_clear_poison for dax operation drivers/dax/super.c | 13 +++++++++++++ drivers/nvdimm/pmem.c | 17 +++++++++++++++++ fs/dax.c | 9 +++++++++ include/linux/dax.h | 6 ++++++ 4 files changed, 45 insertions(+) -- 2.18.4