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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 82277C432BE for ; Thu, 12 Aug 2021 15:25:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1299C61103 for ; Thu, 12 Aug 2021 15:25:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1299C61103 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 59EAF8D0003; Thu, 12 Aug 2021 11:25:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 54E378D0002; Thu, 12 Aug 2021 11:25:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 43D568D0003; Thu, 12 Aug 2021 11:25:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id 288FC8D0002 for ; Thu, 12 Aug 2021 11:25:53 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 79AC28249980 for ; Thu, 12 Aug 2021 15:25:52 +0000 (UTC) X-FDA: 78466803744.02.66DCAFB Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by imf08.hostedemail.com (Postfix) with ESMTP id B7CB430083AB for ; Thu, 12 Aug 2021 15:25:51 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10074"; a="194960877" X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="194960877" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 08:25:49 -0700 X-IronPort-AV: E=Sophos;i="5.84,316,1620716400"; d="scan'208";a="517494570" Received: from agluck-desk2.sc.intel.com (HELO agluck-desk2.amr.corp.intel.com) ([10.3.52.146]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2021 08:25:49 -0700 Date: Thu, 12 Aug 2021 08:25:48 -0700 From: "Luck, Tony" To: HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+j44CA55u05LmfKQ==?= Cc: Naoya Horiguchi , Oscar Salvador , Muchun Song , Mike Kravetz , "linux-mm@kvack.org" , Andrew Morton , Michal Hocko , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 1/2] mm,hwpoison: fix race with hugetlb page allocation Message-ID: <20210812152548.GA1579021@agluck-desk2.amr.corp.intel.com> References: <20210603233632.2964832-1-nao.horiguchi@gmail.com> <20210603233632.2964832-2-nao.horiguchi@gmail.com> <20210812042813.GA1576603@agluck-desk2.amr.corp.intel.com> <20210812090303.GA153531@hori.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210812090303.GA153531@hori.linux.bs1.fc.nec.co.jp> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B7CB430083AB X-Stat-Signature: 6pmc8nh91jgof3mrfpwy7ybdwitmg3t8 Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none); spf=none (imf08.hostedemail.com: domain of tony.luck@intel.com has no SPF policy when checking 192.55.52.136) smtp.mailfrom=tony.luck@intel.com X-HE-Tag: 1628781951-560307 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 Thu, Aug 12, 2021 at 09:03:04AM +0000, HORIGUCHI NAOYA(=E5=A0=80=E5=8F= =A3 =E7=9B=B4=E4=B9=9F) wrote: > Sorry for the failures. I think that the following patch (and dependenc= ies) > should solve the issue. > https://lore.kernel.org/linux-mm/20210614021212.223326-6-nao.horiguchi@= gmail.com/. > I'll submit the update (maybe the patchset will be smaller by feedbacks= ) > later soon. I was uncertain about which dependencies you meant. So I followed the advice in the cover letter for the patch series containing that patch and did: $ git fetch https://github.com/nhoriguchi/linux hwpoison This kernel still has some odd issues and the poison page did not get unmapped from my test user application. See git://git.kernel.org/pub/scm/linux/kernel/git/aegl/ras-tools.git for my test program. In this case I was just running with default setting= s to inject an error into a user data page and then consume it. Here's the dmesg output. There are multiple calls to memory_failure() because the poison address is signalled both by the memory controller (CMCI with UCNA signature) and the DCU (#MC with SRAR signature). Note that the first message says: "recovery action for unknown page: Igno= red" [ 70.331253] EINJ: Error INJection is initialized. [ 76.949490] process '/aegl/ras-tools/einj_mem_uc' started with executa= ble stack [ 77.481846] Disabling lock debugging due to kernel taint [ 77.482004] mce: [Hardware Error]: Machine check events logged [ 77.487176] mce: Uncorrected hardware memory error in user-access at 7= e025e400 [ 77.493225] {1}[Hardware Error]: Hardware error from APEI Generic Hard= ware Error Source: 0 [ 77.508704] {1}[Hardware Error]: event severity: recoverable [ 77.514361] {1}[Hardware Error]: Error 0, type: recoverable [ 77.520011] {1}[Hardware Error]: fru_text: Card01, ChnG, DIMM0 [ 77.525921] {1}[Hardware Error]: section_type: memory error [ 77.531659] {1}[Hardware Error]: error_status: 0x0000000000000400 [ 77.537914] {1}[Hardware Error]: physical_address: 0x00000007e025e40= 0 [ 77.544518] {1}[Hardware Error]: node: 0 card: 6 module: 0 rank: 1 b= ank: 8 device: 0 row: 15105 column: 896 [ 77.554503] {1}[Hardware Error]: error_type: 4, single-symbol chipki= ll ECC [ 77.561548] {1}[Hardware Error]: DIMM location: NODE 3 CPU0_DIMM_G1 [ 77.568135] Memory failure: 0x7e025e: recovery action for unknown page= : Ignored [ 77.575445] Memory failure: 0x7e025e: already hardware poisoned [ 77.627894] EDAC skx MC3: HANDLING MCE MEMORY ERROR [ 77.633600] EDAC skx MC3: CPU 0: Machine Check Event: 0x0 Bank 25: 0xa= c00000200a00090 [ 77.633601] EDAC skx MC3: TSC 0x18d57ce28f4f25 [ 77.633602] EDAC skx MC3: ADDR 0x7e025e400 [ 77.633603] EDAC skx MC3: MISC 0x9000201d809c086 [ 77.633603] EDAC skx MC3: PROCESSOR 0:0x606a6 TIME 1628780833 SOCKET 0= APIC 0x0 [ 77.633608] EDAC MC3: 1 UE memory read error on CPU_SrcID#0_MC#3_Chan#= 0_DIMM#0 (channel:0 slot:0 page:0x7e025e offset:0x400 grain:32 - err_cod= e:0x00a0:0x0090 SystemAddress:0x7e025e400 ProcessorSocketId:0x0 MemoryCo= ntrollerId:0x3 ChannelAddress:0xec04bc00 ChannelId:0x0 RankAddress:0x7602= 5c00 PhysicalRankId:0x1 DimmSlotId:0x0 Row:0x3b01 Column:0x380 Bank:0x0 B= ankGroup:0x2 ChipSelect:0x1 ChipId:0x0) [ 77.633611] Memory failure: 0x7e025e: Sending SIGBUS to einj_mem_uc:12= 283 due to hardware memory corruption [ 77.668827] mce: [Hardware Error]: Machine check events logged [ 77.678605] Memory failure: 0x7e025e: already hardware poisoned [ 77.736685] EDAC skx MC3: HANDLING MCE MEMORY ERROR [ 77.742392] EDAC skx MC3: CPU 0: Machine Check Event: 0x0 Bank 255: 0x= b40000000000009f [ 77.742394] EDAC skx MC3: TSC 0x0 [ 77.742394] EDAC skx MC3: ADDR 0x7e025e400 [ 77.742395] EDAC skx MC3: MISC 0x0 [ 77.742395] EDAC skx MC3: PROCESSOR 0:0x606a6 TIME 1628780833 SOCKET 0= APIC 0x0 [ 77.742397] EDAC MC3: 1 UE memory read error on CPU_SrcID#0_MC#3_Chan#= 0_DIMM#0 (channel:0 slot:0 page:0x7e025e offset:0x400 grain:32 - err_cod= e:0x0000:0x009f SystemAddress:0x7e025e400 ProcessorSocketId:0x0 MemoryCo= ntrollerId:0x3 ChannelAddress:0xec04bc00 ChannelId:0x0 RankAddress:0x7602= 5c00 PhysicalRankId:0x1 DimmSlotId:0x0 Row:0x3b01 Column:0x380 Bank:0x0 B= ankGroup:0x2 ChipSelect:0x1 ChipId:0x0) [ 77.777612] Memory failure: 0x7e025e: already hardware poisoned -Tony