Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1003916rwe; Thu, 25 Aug 2022 13:22:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR5tj0BfsO5BrOkUb+hLM4ZleiWR9bcoIeyqgFctdHrcU99ysXS6rn0qGVgkSHBF2WHVPpLq X-Received: by 2002:a05:6a00:1826:b0:537:b261:3e4d with SMTP id y38-20020a056a00182600b00537b2613e4dmr659043pfa.65.1661458958976; Thu, 25 Aug 2022 13:22:38 -0700 (PDT) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx18-20020a17090af49200b001f31ae4c753si245260pjb.78.2022.08.25.13.22.28; Thu, 25 Aug 2022 13:22:38 -0700 (PDT) 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=@intel.com header.s=Intel header.b=ZOyg0QQO; arc=fail (signature failed); 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238261AbiHYT25 (ORCPT + 99 others); Thu, 25 Aug 2022 15:28:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231905AbiHYT24 (ORCPT ); Thu, 25 Aug 2022 15:28:56 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97E37BD770; Thu, 25 Aug 2022 12:28:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661455734; x=1692991734; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=1KICcVJCBqyEk3It+OxuLPa7j5f7j8x0cDuvsHPNHf8=; b=ZOyg0QQOkPmpLmCSn1KCP4A8m/OaxWyOCdsgktmN444Kv8t+bdsgwol/ IA9dH52I7OofVdAPsHmVpEDifT7rsvhiYQnJvsksHjbeKnOVNjP3xrnld DnrLmTccQej987iEO+EdhL2+q3KpH1ASUTHS28xHfaM5OKqprYvaMKD4P VKW0+83M6UIPGD4/abhPgKtquBg87FZAyUCZwBy8gySeBy4v1f3m1/EPx drTsNlp5yGmkutdlKUVZ8q6ek8ItNZmF2e371KXA1S2bb/XV/AJffCzBe Br4mbIi0f0UGr1TaSXohvC2mUkC6ot5trw7e8geDpHtonjJ+NyFkXTolA g==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="277356814" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="277356814" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 12:28:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="561163665" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga003.jf.intel.com with ESMTP; 25 Aug 2022 12:28:53 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 25 Aug 2022 12:28:52 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 25 Aug 2022 12:28:52 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 25 Aug 2022 12:28:52 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 25 Aug 2022 12:28:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jJ7tWKmyk7qpP0OtpvpHAohTphrQcZPCk4HXKSLtPTizQS8c6E4QrNXKiqG3lQ66rf70rcDIzR2tqELEwDewZ2Zlk/tx26I+ck3nJiBAeQhyMFYZLovWduMEJwvSrMhNgCMi6Gb2CkqYsJhCPQl1ZSBng5T6EpSVKduHq+9k797gIVRmk8G6mv795LUpZ4GqW3cN/m/fsf7/oo9PYNjq6p+nRlusM78Fzh2G9R5yDxkPWINzPZQPgaaKEDFP/JsJ13ky0+/hy7G+e299aJwVtFsEAPa5vWqiqO84IcdSS81BDs4Jdj9ll5QiYtTx52a5lo31nlB+4zzeHwQ3DfeNkA== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/As9I/+tGP4V2qhg3J5Fl5KKE3HFjvpVHmfFsE/hSW4=; b=UcvzlVBEe1sPWTvZ1cpVqDOL0r0dHahUd2qjOC3T7bKpp21DlHZCAB/bGKnsr9fswUEzFP4ojpgrgk2aHg9uUVQpYZuMBAI/BXaoTF1y/n41NaLigd+84i+wC/BH3DmYUlfAviZnmy5fJm11HfF7WevjGRC0YXsZIDGzFH1i5W/Ay3U4Su/wIiI1RXFhYxTRGbCJyUf893l0hvjRg1Aoi47/NHDcdcgtZ+gcFtUcSuxGD2AuxjqVgo4ZUBRGZBKMxznT64E0P3zonhsjqZso9X0krS07qY7kAxDnD3H16Z7wowi6scKKMDmTeMZBbM2aro1FR35LzX3JZwD/T8hIJA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR1101MB2126.namprd11.prod.outlook.com (2603:10b6:301:50::20) by DM6PR11MB4738.namprd11.prod.outlook.com (2603:10b6:5:2a3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15; Thu, 25 Aug 2022 19:28:50 +0000 Received: from MWHPR1101MB2126.namprd11.prod.outlook.com ([fe80::9847:345e:4c5b:ca12]) by MWHPR1101MB2126.namprd11.prod.outlook.com ([fe80::9847:345e:4c5b:ca12%6]) with mapi id 15.20.5546.024; Thu, 25 Aug 2022 19:28:49 +0000 Date: Thu, 25 Aug 2022 12:28:45 -0700 From: Dan Williams To: Dan Williams , HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+j44CA55u05LmfKQ==?= 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" , "djwong@kernel.org" , "david@fromorbit.com" , "hch@infradead.org" , "akpm@linux-foundation.org" , "jane.chu@oracle.com" , "rgoldwyn@suse.de" , "viro@zeniv.linux.org.uk" , "willy@infradead.org" , "linmiaohe@huawei.com" , Christoph Hellwig Subject: Re: [PATCH v2 05/14] mm: Introduce mf_dax_kill_procs() for fsdax case Message-ID: <6307cd6d8bec5_1b322946@dwillia2-xfh.jf.intel.com.notmuch> References: <20220603053738.1218681-1-ruansy.fnst@fujitsu.com> <20220603053738.1218681-6-ruansy.fnst@fujitsu.com> <63069db388d43_1b3229426@dwillia2-xfh.jf.intel.com.notmuch> <20220824234142.GA850225@hori.linux.bs1.fc.nec.co.jp> <6306fbabab4cd_18ed7294e2@dwillia2-xfh.jf.intel.com.notmuch> <6307031b763be_18ed729455@dwillia2-xfh.jf.intel.com.notmuch> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6307031b763be_18ed729455@dwillia2-xfh.jf.intel.com.notmuch> X-ClientProxiedBy: SJ0PR05CA0159.namprd05.prod.outlook.com (2603:10b6:a03:339::14) To MWHPR1101MB2126.namprd11.prod.outlook.com (2603:10b6:301:50::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 56c99c02-23dd-4cad-f7c5-08da86d00969 X-MS-TrafficTypeDiagnostic: DM6PR11MB4738:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: em4ImuqZilbrWCFTuNmRY1AbeNDL0N1aEs+8NuIovpHRIlf8J8SSApbFrzMsQ5uMtSRjTYjQ/tg3Mv9AWGf3EbLYUDHqUDhNKQtnnYTSAc0zMxXzlnWm94wVa1Scq9qFIir/OYeLGI0eGlucoQeSEyOckAMFwP1wdUhw1KL/iX9pMbq1WSS1+A/RHFEnFZp2KrXJc8ZfcDDqLbdo4QL9USlWns42mv37laZlpx/0tCcjB3IG54V7dUKScAvCXqq1U/7ZjrYY+uyURhzxTqILTK1bfVmxzxUf6+4y2mdU7Ve95ogJs0qKzU9WMa2DfvQq14mZUvB2TCwrZlxqpOswo318unECi4t/xJ4IzyNtpamxhkJu1eNPht5XHCPCKvx0TUO1GvjwnHVRjivtEMUL0o8/ghsfdYdppr9utyK4YQvM6UHPJJebyMcFyKIk7aTCCYd8HNZ9ZM0G/Pqb1fkHwaIIIIzvjacbUuo7uZztseYL/fbrumVdP4YXs+GRZUzxzSNBJY1U0HrN3fUMkN2gw3rczOSfYzZTUml2Xx5+IqA4NDvNXSIoUyXayEFZEIMjmc+/J9M6aVBux/AIBmEtMA8dcVSw3ULkG9zFqCc2+IIROhY6VXnia/cLTAK7mqNbe2jpnVpPqwVREqbEVDgoeIv63R9TPQsnXx1W7VJZH9ogZwrw5JxoxtnQhK/KBMKkkZYrtu0Ha0smK8RU0VEqDA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1101MB2126.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(346002)(376002)(136003)(39860400002)(366004)(6512007)(26005)(6506007)(6666004)(86362001)(82960400001)(186003)(41300700001)(83380400001)(6486002)(9686003)(478600001)(66556008)(316002)(4326008)(110136005)(54906003)(66476007)(8676002)(66946007)(7416002)(8936002)(38100700002)(2906002)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q3ErQ1BFRTJoOWNndmxUQndjTEQ3cUpkakpJMnpiVUh0RlY2Z2lRQkhycUpM?= =?utf-8?B?OHB0eTE2eitYdkppTitNemVseG9sbmU0T0xoOXNQVDZjeEFzR0NjbEV3Wnkw?= =?utf-8?B?eHIwWk5tQWMreERXcmpRRjJCN2tKUE1sQ094MmJxSDZSaG1WRENudXI0b0xZ?= =?utf-8?B?SFQ2ekdOMlQyT2tFbmxHckZEaDNXTnhObmJiTHorVDB4a0FSWGhXVUZ6ajVZ?= =?utf-8?B?MTJOdzE4Zkx6ZC82Rk92MWNVSkRocE4zOTlqS0dlSzRLL2pacmFkbWJJTTRE?= =?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EJLUTVpSHNYU3FGREhUTERxaC9UVUVpNi80ZEpX?= =?utf-8?B?czNiNXF6ZDdjZzNlWnhoUkdjbmpJdmR3TXovU1h4UTR2OC9LTi9aQmtHSjRs?= =?utf-8?B?aGc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 56c99c02-23dd-4cad-f7c5-08da86d00969 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2126.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2022 19:28:49.8105 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iBL0BXl8z57CGrONJqPKjHa3wGywjTOp6dEOI4BQQeSWHCSZnvTUk6B3EpWBN2FJ1E7Le47HiQWRfet2TDW8mgaydJTkflCMWQVJf8DqLZI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4738 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Dan Williams wrote: > Dan Williams wrote: > > HORIGUCHI NAOYA(堀口 直也) wrote: > > > On Wed, Aug 24, 2022 at 02:52:51PM -0700, Dan Williams wrote: > > > > Shiyang Ruan wrote: > > > > > This new function is a variant of mf_generic_kill_procs that accepts a > > > > > file, offset pair instead of a struct to support multiple files sharing > > > > > a DAX mapping. It is intended to be called by the file systems as part > > > > > of the memory_failure handler after the file system performed a reverse > > > > > mapping from the storage address to the file and file offset. > > > > > > > > > > Signed-off-by: Shiyang Ruan > > > > > Reviewed-by: Dan Williams > > > > > Reviewed-by: Christoph Hellwig > > > > > Reviewed-by: Darrick J. Wong > > > > > Reviewed-by: Miaohe Lin > > > > > --- > > > > > include/linux/mm.h | 2 + > > > > > mm/memory-failure.c | 96 ++++++++++++++++++++++++++++++++++++++++----- > > > > > 2 files changed, 88 insertions(+), 10 deletions(-) > > > > > > > > Unfortunately my test suite was only running the "non-destructive" set > > > > of 'ndctl' tests which skipped some of the complex memory-failure cases. > > > > Upon fixing that, bisect flags this commit as the source of the following > > > > crash regression: > > > > > > Thank you for testing/reporting. > > > > > > > > > > > kernel BUG at mm/memory-failure.c:310! > > > > invalid opcode: 0000 [#1] PREEMPT SMP PTI > > > > CPU: 26 PID: 1252 Comm: dax-pmd Tainted: G OE 5.19.0-rc4+ #58 > > > > Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 > > > > RIP: 0010:add_to_kill+0x304/0x400 > > > > [..] > > > > Call Trace: > > > > > > > > collect_procs.part.0+0x2c8/0x470 > > > > memory_failure+0x979/0xf30 > > > > do_madvise.part.0.cold+0x9c/0xd3 > > > > ? lock_is_held_type+0xe3/0x140 > > > > ? find_held_lock+0x2b/0x80 > > > > ? lock_release+0x145/0x2f0 > > > > ? lock_is_held_type+0xe3/0x140 > > > > ? syscall_enter_from_user_mode+0x20/0x70 > > > > __x64_sys_madvise+0x56/0x70 > > > > do_syscall_64+0x3a/0x80 > > > > entry_SYSCALL_64_after_hwframe+0x46/0xb0 > > > > > > This stacktrace shows that VM_BUG_ON_VMA() in dev_pagemap_mapping_shift() > > > was triggered. I think that BUG_ON is too harsh here because address == > > > -EFAULT means that there's no mapping for the address. The subsequent > > > code considers "tk->size_shift == 0" as "no mapping" cases, so > > > dev_pagemap_mapping_shift() can return 0 in such a case? > > > > > > Could the following diff work for the issue? > > > > This passes the "dax-ext4.sh" and "dax-xfs.sh" tests from the ndctl > > suite. So that diff works to avoid the BUG_ON, but it does not work to handle the error case. I think the problem comes from: vma->vm_file->f_mapping != folio->mapping ...where page_folio(page)->mapping is likely not setup correctly for DAX pages. This goes back to the broken nature of DAX page reference counting which I am fixing now, but this folio association also needs to be fixed up.