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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43F9BC77B6C for ; Thu, 13 Apr 2023 01:55:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 898D86B0072; Wed, 12 Apr 2023 21:55:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 848806B0074; Wed, 12 Apr 2023 21:55:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7107F900002; Wed, 12 Apr 2023 21:55:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 60DC46B0072 for ; Wed, 12 Apr 2023 21:55:40 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1F47912030B for ; Thu, 13 Apr 2023 01:55:40 +0000 (UTC) X-FDA: 80674701240.20.C76693A Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf03.hostedemail.com (Postfix) with ESMTP id EAF722000A for ; Thu, 13 Apr 2023 01:55:37 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf03.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=liushixin2@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681350938; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rxwff+szEQSkCG3SGmzem2rBE2uIjaY1ggEPejQ+vGA=; b=VBG+Fa+KqxEVqxk02hmDsZWJfRiHpU7MpVGcjpen0xD177Jpy5Z8gFf0iJIZ31J5Hi74uH WpymwDH5HGMMXTRUCMQ5Zle8v5nRBSCycu7vEq6eHNscJ0mDWdch47h1wzVMiSdDS+RO7Z iAFHSzgmEhJzXdxjptJFrASmLTMwJsI= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf03.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=liushixin2@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681350938; a=rsa-sha256; cv=none; b=elRSFhM/16pskPkYXQyMLbO2CAyOjALEEP50EVuSRkw0fMF5tgAiGNK4uYcqLhB62lfLR6 vblNS1GJOf58JkB8nd9yg1+Y9xepOtopohdzHCx9gwErll7txDuQjX4Fb5eILsGR0kYVvX ytZZTMiYyyMInOyklD4jB/w2uXQ6z24= Received: from dggpemm100009.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4PxjLw5zTszDsg7; Thu, 13 Apr 2023 09:54:48 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by dggpemm100009.china.huawei.com (7.185.36.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 13 Apr 2023 09:55:33 +0800 Subject: Re: [PATCH -next] mm: hwpoison: support recovery from HugePage copy-on-write faults To: Andrew Morton , Mike Kravetz References: <20230411092741.780679-1-liushixin2@huawei.com> <20230412181350.GA22818@monkey> <20230412145718.0bcb7dd98112a3010711ad0b@linux-foundation.org> <20230412222138.GB4759@monkey> <20230412155618.720e6b3aa5be6444f7889ea6@linux-foundation.org> CC: Naoya Horiguchi , Tony Luck , Miaohe Lin , Muchun Song , , From: Liu Shixin Message-ID: <5202b6fe-7008-6e1b-eaae-03edbe7c055c@huawei.com> Date: Thu, 13 Apr 2023 09:55:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20230412155618.720e6b3aa5be6444f7889ea6@linux-foundation.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: EAF722000A X-Stat-Signature: y4dwe4b8cbg33bd9qxppwz3pq49mnxo4 X-HE-Tag: 1681350937-782057 X-HE-Meta: U2FsdGVkX1+5wK6v8Qe/pG2HnlX6RI8OuCbalmaCtFEgd9VD59vJp9o/NnfjKxRDAEh3iNE8ORHEIM/c2/j6wJrl5nbkaZEI/oqa2/tUtkD2fszaDsoQEKM20we0G4Xp9TwKwRR1xika27k8MJVJG67/yK1oJHcC4SzutHhi8BvU746NOp0+JadY/C/HTE2eJEWpR6OJtguiRCp8XRFzcsRtbK+dRDmxTuzZrs/70xKSukEjvANoOQIVDJwTgIBnh0dz+3uSX1libvV+Kqe3FOU/wLB2vfaz1gIC/09SX+nmXKUDhj4hWpCq6TmxILrACoyCStve8ogADTtg0QmZ0viKYiNtDfR+PMnU3EzzAYhRC7N8snCPtPC1lqdBQMc52V1l8zYF49er/19fqtHPg8y6dHxGhNWtBIuiejO1uqdjE8B5445tF+StkO6YvqY+4wOEqSqa/nrvimvlyoXFH2YsSEdo5vV514OvNffiomZO4B+zKYaeHgDNahhBLwbSecnlsqTE+orusxcVBV1hTXTnNv0xC0XIzy0P1VLPLAWrBihnJ7DEYZNwW4QQJLZR5aciJXND/vQ9L3ju4jVOvx9QwrtYC9Jj9qG1UJ+A/pynbYaizCQyb4n7w+gu86LbxL0NHCxzCg6w0ykk3Nm4yt/cuHTj7HECYjeKCvHUy4I8NzkIlqJUYVvoEn7In1IPdi+klAYTlNVYnuPxq5BE1LQNuG6rlRbq9PMxumJTNr2CkPYLLpJEzFSF6pQTCkjrVHFobXIiNhv8RWy53WyCs2Ipwf90OfeHNkbUukMrTsiCTSzLmS1FqWQux6FW+3WyPHGayRannYTw+NqLY7OT2icQsgVgryhE//rkwWEJeNzyUcMfqEgFZk1wwndGOJqVsGJkvjvN49zn2GT2xf3Ffj/Ju2rg5xMEinGIe8mE1ho8yqoVBmTomOB1sv1MTAjhjSKzjCrtiKotGXsVmF9 ldnv7pkz 9TDNVE5rPX/fLPpufPJUY3JuJJqugUqDhQPaLJKYnis2tDFlDp8kUiexYDMJjML8M/Dr5pIn5aw3yfBq6S2H+mItUJP5ItMkDBF6UHEwT+6elWGTXcHZBmIGrBo1feo+NQqknXmaZvuPv4u/MWSbw9Sm/3E9OAkEOppH3EOmKFg0lrt8= 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 2023/4/13 6:56, Andrew Morton wrote: > On Wed, 12 Apr 2023 15:21:38 -0700 Mike Kravetz wrote: > >>>> Commit a873dfe1032a ("mm, hwpoison: try to recover from copy-on write >>>> faults") introduced the routine copy_user_highpage_mc() to gracefully >>>> handle copying of user pages with uncorrectable errors. Previously, >>>> such copies would result in a kernel crash. hugetlb has separate code >>>> paths for copy-on-write and does not benefit from the changes made in >>>> commit a873dfe1032a. >> I was just going to suggest adding the line, >> >> Hence, copy-on-write of hugetlb user pages with uncorrectable errors >> will result in a kernel crash as was the case with 'normal' pages before >> commit a873dfe1032a. >> >> However, I'm guessing it might be more clear if we start with the >> runtime effects. Something like: >> >> copy-on-write of hugetlb user pages with uncorrectable errors will result >> in a kernel crash. This is because the copy is performed in kernel mode >> and in general we can not handle accessing memory with such errors while >> in kernel mode. Commit a873dfe1032a ("mm, hwpoison: try to recover from >> copy-on write faults") introduced the routine copy_user_highpage_mc() to >> gracefully handle copying of user pages with uncorrectable errors. However, >> the separate hugetlb copy-on-write code paths were not modified as part >> of commit a873dfe1032a. > Sounds good. So I assume cc:stable is desirable. > > I can't actually get the patch to apply to anything. Can we please > have a redo against current -linus? OK, I will apply this patch to mainline again. > > . >