From patchwork Wed Jun 24 15:01:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 11623403 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AFE0912 for ; Wed, 24 Jun 2020 15:04:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 576E9206C0 for ; Wed, 24 Jun 2020 15:04:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rl9izeas" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 576E9206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8E3946B002D; Wed, 24 Jun 2020 11:04:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 892BA6B002F; Wed, 24 Jun 2020 11:04:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 783966B0030; Wed, 24 Jun 2020 11:04:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 607486B002D for ; Wed, 24 Jun 2020 11:04:33 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 192D121254 for ; Wed, 24 Jun 2020 15:04:33 +0000 (UTC) X-FDA: 76964426826.12.plane56_4a0db3626e45 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 4DB3018024BEF for ; Wed, 24 Jun 2020 15:02:35 +0000 (UTC) X-Spam-Summary: 1,0,0,27f0407dd1825a82,d41d8cd98f00b204,nao.horiguchi@gmail.com,,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1345:1359:1437:1535:1542:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2899:3138:3139:3140:3141:3142:3353:3867:3871:3872:3874:4250:4321:4385:4605:5007:6261:6653:7576:8660:8957:9413:10004:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12679:12740:12895:13148:13230:14093:14181:14394:14721:21060:21080:21094:21212:21323:21324:21444:21627:21666:21939:21990:22119:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04y8jj4yssqf7tjo1mwnku6eyem66opbydps57nqhwnh1ycc4y9zccg475xi6g8.oc9oap447o9m5u3ygbhstmbgdanss7p6jzf7aods9yjsfag6wricsjn4wh38f5w.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: plane56_4a0db3626e45 X-Filterd-Recvd-Size: 5999 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 15:02:29 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id k1so1168964pls.2 for ; Wed, 24 Jun 2020 08:02:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JWnneQzXfI0UCqfkUaeoAs3ig549rm/MnU8+no9mpQ8=; b=Rl9izeasMTckdt53HqfGTVXn8hAB7zTLsVPwhL7+DoOPgmHJ1jZcR0+vO+ug/jMR8p 25vwgeyf8U4dsLT36Ix4duFc4Xdof7G2CRr2xeT6SLQ1oW7b3xgbKjJjK7xoJ3qDsRa1 7adwN/K8ocUYxYMT4i34qZew5jTojr2t2rUUEaIEoWhNQwbDjENmYFLC0iOTJH4cz2Au YQHtwNAqlbccLU3Q//01FIhA8ZaSS8xKarSyfsautTo8m90ExIUerNO1evzIH70Da7Bu nXjpAuFY81AEyUX+MZ9NgJg/EE5HUVE3UYUSi1XMQFXN6jgozXTKUO4QpslpVQoXoKzc 8Log== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JWnneQzXfI0UCqfkUaeoAs3ig549rm/MnU8+no9mpQ8=; b=TPOFrDE7PGKlSHanoKe6Z8dKZ7WW0vESABLCGss+UemfK62lXip9wNgQb0xc7/IEHm Tr6tiWe0B1xV43geEhAWT0KiYtqstmacewBRWmUNF8xg4vuqEQcYr/iDttirK9p8jTso 6V6rAPfss53IraDvdGZrvM0v9JpdGTLuvne0+GD/DluHIoScS5ArRJKGvBI4xQEPdlQm 0+xlrR8hNr5sxZ3wtgW9P5gIdUXDjBwO75USPJStRXZbOPpJDeVOnlm6Qllq3CCABk+v k/yj1J2L1dzJSfTJG4Ycr+7p86qSj3mKOQQFiq+9axnq10qXtHOX9W4b/gz3pXdAyW6n D5Hg== X-Gm-Message-State: AOAM5303Ew0qmIrf/+OLmd3LCRWKQDgZJ7zjtGXUhy42wofO3XKXS9vT NqCVFHfBfcIP1E7JBCOdja+M/OVh2w== X-Google-Smtp-Source: ABdhPJxl1PHw4LkPk6lT5aYG/XIcClNITVvyBSM5EkGGToos6HlxyHE06skpVZArpn/F/RPE11cC0A== X-Received: by 2002:a17:90a:3608:: with SMTP id s8mr29753490pjb.86.1593010948525; Wed, 24 Jun 2020 08:02:28 -0700 (PDT) Received: from ip-172-31-41-194.ap-northeast-1.compute.internal (ec2-52-199-21-241.ap-northeast-1.compute.amazonaws.com. [52.199.21.241]) by smtp.gmail.com with ESMTPSA id i125sm17013705pgd.21.2020.06.24.08.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 08:02:28 -0700 (PDT) From: nao.horiguchi@gmail.com To: linux-mm@kvack.org Cc: mhocko@kernel.org, akpm@linux-foundation.org, mike.kravetz@oracle.com, osalvador@suse.de, tony.luck@intel.com, david@redhat.com, aneesh.kumar@linux.vnet.ibm.com, zeil@yandex-team.ru, naoya.horiguchi@nec.com, linux-kernel@vger.kernel.org Subject: [PATCH v3 15/15] mm,hwpoison: introduce MF_MSG_UNSPLIT_THP Date: Wed, 24 Jun 2020 15:01:37 +0000 Message-Id: <20200624150137.7052-16-nao.horiguchi@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200624150137.7052-1-nao.horiguchi@gmail.com> References: <20200624150137.7052-1-nao.horiguchi@gmail.com> X-Rspamd-Queue-Id: 4DB3018024BEF X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: From: Naoya Horiguchi memory_failure() is supposed to call action_result() when it handles a memory error event, but there's one missing case. So let's add it. I find that include/ras/ras_event.h has some other MF_MSG_* undefined, so this patch also adds them. Signed-off-by: Naoya Horiguchi --- include/linux/mm.h | 1 + include/ras/ras_event.h | 3 +++ mm/memory-failure.c | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git v5.8-rc1-mmots-2020-06-20-21-44/include/linux/mm.h v5.8-rc1-mmots-2020-06-20-21-44_patched/include/linux/mm.h index d708033c50c0..10ee48f05f68 100644 --- v5.8-rc1-mmots-2020-06-20-21-44/include/linux/mm.h +++ v5.8-rc1-mmots-2020-06-20-21-44_patched/include/linux/mm.h @@ -3033,6 +3033,7 @@ enum mf_action_page_type { MF_MSG_BUDDY, MF_MSG_BUDDY_2ND, MF_MSG_DAX, + MF_MSG_UNSPLIT_THP, MF_MSG_UNKNOWN, }; diff --git v5.8-rc1-mmots-2020-06-20-21-44/include/ras/ras_event.h v5.8-rc1-mmots-2020-06-20-21-44_patched/include/ras/ras_event.h index 36c5c5e38c1d..0bdbc0d17d2f 100644 --- v5.8-rc1-mmots-2020-06-20-21-44/include/ras/ras_event.h +++ v5.8-rc1-mmots-2020-06-20-21-44_patched/include/ras/ras_event.h @@ -361,6 +361,7 @@ TRACE_EVENT(aer_event, EM ( MF_MSG_POISONED_HUGE, "huge page already hardware poisoned" ) \ EM ( MF_MSG_HUGE, "huge page" ) \ EM ( MF_MSG_FREE_HUGE, "free huge page" ) \ + EM ( MF_MSG_NON_PMD_HUGE, "non-pmd-sized huge page" ) \ EM ( MF_MSG_UNMAP_FAILED, "unmapping failed page" ) \ EM ( MF_MSG_DIRTY_SWAPCACHE, "dirty swapcache page" ) \ EM ( MF_MSG_CLEAN_SWAPCACHE, "clean swapcache page" ) \ @@ -373,6 +374,8 @@ TRACE_EVENT(aer_event, EM ( MF_MSG_TRUNCATED_LRU, "already truncated LRU page" ) \ EM ( MF_MSG_BUDDY, "free buddy page" ) \ EM ( MF_MSG_BUDDY_2ND, "free buddy page (2nd try)" ) \ + EM ( MF_MSG_DAX, "dax page" ) \ + EM ( MF_MSG_UNSPLIT_THP, "unsplit thp" ) \ EMe ( MF_MSG_UNKNOWN, "unknown page" ) /* diff --git v5.8-rc1-mmots-2020-06-20-21-44/mm/memory-failure.c v5.8-rc1-mmots-2020-06-20-21-44_patched/mm/memory-failure.c index 9ad3198a3954..e57cfe0606f5 100644 --- v5.8-rc1-mmots-2020-06-20-21-44/mm/memory-failure.c +++ v5.8-rc1-mmots-2020-06-20-21-44_patched/mm/memory-failure.c @@ -586,6 +586,7 @@ static const char * const action_page_types[] = { [MF_MSG_BUDDY] = "free buddy page", [MF_MSG_BUDDY_2ND] = "free buddy page (2nd try)", [MF_MSG_DAX] = "dax page", + [MF_MSG_UNSPLIT_THP] = "unsplit thp", [MF_MSG_UNKNOWN] = "unknown page", }; @@ -1376,8 +1377,10 @@ int memory_failure(unsigned long pfn, int flags) } if (PageTransHuge(hpage)) { - if (try_to_split_thp_page(p, "Memory Failure") < 0) + if (try_to_split_thp_page(p, "Memory Failure") < 0) { + action_result(pfn, MF_MSG_UNSPLIT_THP, MF_IGNORED); return -EBUSY; + } VM_BUG_ON_PAGE(!page_count(p), p); }