From patchwork Thu Jun 23 23:51:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naoya Horiguchi X-Patchwork-Id: 12893263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D54C4C433EF for ; Thu, 23 Jun 2022 23:52:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7A63D8E01AE; Thu, 23 Jun 2022 19:52:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7564C8E01A1; Thu, 23 Jun 2022 19:52:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61E7B8E01AE; Thu, 23 Jun 2022 19:52:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 5504B8E01A1 for ; Thu, 23 Jun 2022 19:52:57 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 31AFD6040E for ; Thu, 23 Jun 2022 23:52:57 +0000 (UTC) X-FDA: 79611153594.21.BDAB20A Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf20.hostedemail.com (Postfix) with ESMTP id C71741C001D for ; Thu, 23 Jun 2022 23:52:56 +0000 (UTC) Received: by mail-pj1-f44.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso1217475pjk.0 for ; Thu, 23 Jun 2022 16:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xlh5+JHPCpuQ09KawzKkUOlMCn4aWXR34ra2vrdN9hI=; b=MEmORMw9CoAhwNYfHfOlrZjmyaV1kxLa2ly8Bz617AoWw6gyQfA+eYRxSScDsayqSE vEeb04MRVgwYo6YZU8ahEfefgc7Zo/NiMU+DYL4YDwHrcNbicueEUnbIqQFX5doIy1jm /kCAQATYrsmfNaVqrDVcb6DJfAGw87zSOMdMLh1lLF7YOPPH/73bvPg34HTyM7tpRGUQ nOjgsZK4t5kglXK6qoK3JAYx7AQQTcRuk8Mj17qhHxTNgnF+Y7GasXDcNgFynTQE9W9L 95RsE1CJ9sfNpVvHVI83dPlXVdq3OhKVdl2cpSil4MWjqDhLx+Kv/eTTwb9LdbB6ZrXn bNEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xlh5+JHPCpuQ09KawzKkUOlMCn4aWXR34ra2vrdN9hI=; b=4q9FPMm5Jm6KygvRFEuHMrk8TQ5u32NjGrU3dhoVNNYSnkH0PZQ28MZBjgYx0Dns0x RmA3p+GCxr40y0fGMZsbbtfXcPR/k92NsDTob55eIBReaLRmTurjCnq18g+dS7C+CVLZ kzjKP05QmeCcKrbrZXvqrezMfMW+SGi2pbVwfNYkqi2MPrQl2hPQMTWSCXZkoW2rtkNp smw/iYjCPRen/ibHBu6+TEjWjQzw0auDtJO7TNH2i3TN7kmE0B6kX1mkGjV2yuZ7yToj o9hvBZGNuNrWKUcRrvIiuS8/yG+75yMnRmJ8kMQaym8yt0T0WRskCV/9mrECfuQhqiUK micw== X-Gm-Message-State: AJIora/EA0FJnUslRNRgLB2V3xkiQtPeKPR2vkEpq579rXxShw27sx7Y 1Q9Tmp9IWbiX1sDivIc0Bz4kDbr0YQ== X-Google-Smtp-Source: AGRyM1soNngnpVcfxmXaErJFMeKvhtVFxNIlwB4ItZCs2wn5DW3s5YIJ6hdZc7kgW4lJHxcSAIlZDg== X-Received: by 2002:a17:90b:1808:b0:1ec:9559:3060 with SMTP id lw8-20020a17090b180800b001ec95593060mr542906pjb.163.1656028375788; Thu, 23 Jun 2022 16:52:55 -0700 (PDT) Received: from ik1-406-35019.vs.sakura.ne.jp (ik1-406-35019.vs.sakura.ne.jp. [153.127.16.23]) by smtp.gmail.com with ESMTPSA id r10-20020a170903020a00b00168eab11f67sm362571plh.94.2022.06.23.16.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 16:52:55 -0700 (PDT) From: Naoya Horiguchi X-Google-Original-From: Naoya Horiguchi To: linux-mm@kvack.org Cc: Andrew Morton , David Hildenbrand , Mike Kravetz , Miaohe Lin , Liu Shixin , Yang Shi , Oscar Salvador , Muchun Song , Naoya Horiguchi , linux-kernel@vger.kernel.org Subject: [PATCH v2 9/9] mm, hwpoison: enable memory error handling on 1GB hugepage Date: Fri, 24 Jun 2022 08:51:53 +0900 Message-Id: <20220623235153.2623702-10-naoya.horiguchi@linux.dev> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220623235153.2623702-1-naoya.horiguchi@linux.dev> References: <20220623235153.2623702-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MEmORMw9; spf=pass (imf20.hostedemail.com: domain of nao.horiguchi@gmail.com designates 209.85.216.44 as permitted sender) smtp.mailfrom=nao.horiguchi@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656028376; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xlh5+JHPCpuQ09KawzKkUOlMCn4aWXR34ra2vrdN9hI=; b=GXTe5FsT2r6i/pQB9+ar7DE0+FQrctbeUH2HioFhDvaW5Fyfm67uIG1oP/7ZceBJMRo00I 6SOAVijPRGJxIvN44moCKQklvcqMzqED3vqznXD0xm1YraSyS84V/1CHYJ0+mVixGiQFoI AZbvrhGoG3QgberBaKqq6oRhMkI+R8I= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656028376; a=rsa-sha256; cv=none; b=HkJfrh19fJ0hFPkHlG9rNXfByqOj8p6qtZ5X7J3lIuCKjBcRk/S76wFKCFU1mOKlmDp5UC HpMQEgVkpEF7jKvd6sk/TG1ee78lHxTUaeeWIOY6fb360LFLXeFz99ECOGlgiZhpo2b17J nbxudYeLfQ1cH8/M+cUWEVctj+wMOHw= X-Stat-Signature: 1869metimhdms9xe1jfqgndgs4wrsw9x X-Rspamd-Queue-Id: C71741C001D X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MEmORMw9; spf=pass (imf20.hostedemail.com: domain of nao.horiguchi@gmail.com designates 209.85.216.44 as permitted sender) smtp.mailfrom=nao.horiguchi@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam02 X-HE-Tag: 1656028376-937905 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 Now error handling code is prepared, so remove the blocking code and enable memory error handling on 1GB hugepage. Signed-off-by: Naoya Horiguchi Reviewed-by: Miaohe Lin --- include/linux/mm.h | 1 - include/ras/ras_event.h | 1 - mm/memory-failure.c | 16 ---------------- 3 files changed, 18 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 044dc5a2e361..9d7e9b5a4d1d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3284,7 +3284,6 @@ enum mf_action_page_type { MF_MSG_DIFFERENT_COMPOUND, MF_MSG_HUGE, MF_MSG_FREE_HUGE, - MF_MSG_NON_PMD_HUGE, MF_MSG_UNMAP_FAILED, MF_MSG_DIRTY_SWAPCACHE, MF_MSG_CLEAN_SWAPCACHE, diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h index d0337a41141c..cbd3ddd7c33d 100644 --- a/include/ras/ras_event.h +++ b/include/ras/ras_event.h @@ -360,7 +360,6 @@ TRACE_EVENT(aer_event, EM ( MF_MSG_DIFFERENT_COMPOUND, "different compound page after locking" ) \ 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" ) \ diff --git a/mm/memory-failure.c b/mm/memory-failure.c index fc7b83cb6468..33521e059f7f 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -728,7 +728,6 @@ static const char * const action_page_types[] = { [MF_MSG_DIFFERENT_COMPOUND] = "different compound page after locking", [MF_MSG_HUGE] = "huge page", [MF_MSG_FREE_HUGE] = "free huge page", - [MF_MSG_NON_PMD_HUGE] = "non-pmd-sized huge page", [MF_MSG_UNMAP_FAILED] = "unmapping failed page", [MF_MSG_DIRTY_SWAPCACHE] = "dirty swapcache page", [MF_MSG_CLEAN_SWAPCACHE] = "clean swapcache page", @@ -1717,21 +1716,6 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb page_flags = head->flags; - /* - * TODO: hwpoison for pud-sized hugetlb doesn't work right now, so - * simply disable it. In order to make it work properly, we need - * make sure that: - * - conversion of a pud that maps an error hugetlb into hwpoison - * entry properly works, and - * - other mm code walking over page table is aware of pud-aligned - * hwpoison entries. - */ - if (huge_page_size(page_hstate(head)) > PMD_SIZE) { - action_result(pfn, MF_MSG_NON_PMD_HUGE, MF_IGNORED); - res = -EBUSY; - goto out; - } - if (!hwpoison_user_mappings(p, pfn, flags, head)) { action_result(pfn, MF_MSG_UNMAP_FAILED, MF_IGNORED); res = -EBUSY;