Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2082865rwl; Thu, 13 Apr 2023 01:07:31 -0700 (PDT) X-Google-Smtp-Source: AKy350a14U64Psqhv0KrnjysvLFqgvfY47GV3VyRGwFpP/FvpQZ3rKUSdn9W5LRWhsglkkrsjeZW X-Received: by 2002:a05:6a00:2e95:b0:62d:d045:392 with SMTP id fd21-20020a056a002e9500b0062dd0450392mr2240046pfb.32.1681373251692; Thu, 13 Apr 2023 01:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681373251; cv=none; d=google.com; s=arc-20160816; b=WrlGCIGKiT4IO7kbiWwgFU0W6BjZt8Nnx5/pfmydPHbIzBKZtgjqDe6RvVGHtZleKm fj6J84LwVz3Qpj/2ktDkJQ7zu/21waowT1EfCzDaFE/WMRQLcjiytrtIZNiujgjv4saE 7GQrXmylRYFr4gpK7xjSYSLzLUby25MWMeVrIRtrucg3ClNXOeMqO2GQI9x59faw1Cgz HmRmc+/glzyp8iKPIF13HZrmhirXwhPMXrufifJC2qPkLPmV93WL8VsOOPPVQ7rGf1NL yrsbPyBFpYIcA6WEOClhpumPNLBVpdeFdrHhijUIZB1gD5/nBcrcB+hvdoX/kDv5bv7u cwhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=iJzMxbW3OC9fMbgGfLn0qYDRTf17hKChmQDIB5m2Z/A=; b=07JAZSTDppQ7VKz/RiBSqKdG/u84g7ErHnNYe9ytENqcIBGVd/tzZVJy6nyGwjGNEX ZorRzvls31CtcZcFYGMkVPVp9dlpM+xBqsFIIeVcC7T49woO0AxuuaBBtuGp6g4rfZ5w grW+V31QA5cj31g/xo0+ChHDFRfX8M+oDMf2DOKB4IiJZh+hBWAL0z976nqBgDu9bE4q ucTZ5iuVS43iMSSgvv9eB2ub3wLcwyWYgSrm7lTt0bWDIisLQclYu5ffBBtZnzGPqIwW 7YYEx2C9IcM413yRk270uBHt6sBoUGxJuJdlgrs/P1tXtB3QfK9tstwlN3OGw9VF32ze pUOQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bv2-20020a632e02000000b004f2022f3cc2si1501855pgb.813.2023.04.13.01.07.20; Thu, 13 Apr 2023 01:07:31 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjDMIAS (ORCPT + 99 others); Thu, 13 Apr 2023 04:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjDMIAR (ORCPT ); Thu, 13 Apr 2023 04:00:17 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01BEC469E for ; Thu, 13 Apr 2023 01:00:15 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PxsPY2gNqzKxxk; Thu, 13 Apr 2023 15:57:37 +0800 (CST) Received: from [10.174.177.229] (10.174.177.229) by kwepemm600003.china.huawei.com (7.193.23.202) 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 16:00:12 +0800 Message-ID: Date: Thu, 13 Apr 2023 16:00:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 2/2] mm: ksm: Support hwpoison for ksm page To: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= CC: "akpm@linux-foundation.org" , "linmiaohe@huawei.com" , "wangkefeng.wang@huawei.com" , "sunnanyong@huawei.com" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" References: <20230330074501.205092-1-xialonglong1@huawei.com> <20230330074501.205092-3-xialonglong1@huawei.com> <20230331054243.GB1435482@hori.linux.bs1.fc.nec.co.jp> From: xialonglong In-Reply-To: <20230331054243.GB1435482@hori.linux.bs1.fc.nec.co.jp> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.229] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 在 2023/3/31 13:42, HORIGUCHI NAOYA(堀口 直也) 写道: > On Thu, Mar 30, 2023 at 03:45:01PM +0800, Longlong Xia wrote: >> hwpoison_user_mappings() is updated to support ksm pages, and add >> collect_procs_ksm() to collect processes when the error hit an ksm >> page. The difference from collect_procs_anon() is that it also needs >> to traverse the rmap-item list on the stable node of the ksm page. >> At the same time, add_to_kill_ksm() is added to handle ksm pages. And >> task_in_to_kill_list() is added to avoid duplicate addition of tsk to >> the to_kill list. This is because when scanning the list, if the pages >> that make up the ksm page all come from the same process, they may be >> added repeatedly. >> >> Signed-off-by: Longlong Xia > > I don't find any specific issue by code review for now, so I'll try to > test your patches. Dear maintainer, Can you please provide a brief update on the testing status of the patch and any suggestions you may have for improving it? Thank you for your time. Best regards, Longlong Xia > > I have one comment about duplicated KSM pages. It seems that KSM controls > page duplication by limiting deduplication factor with max_page_sharing, > primarily for performance reason. But I think it's imporant from memory > RAS's viewpoint too because that means we could allow recovery from memory > errors on a KSM page by making affected processes to switch to the duplicated > pages (without killing the processes!). Maybe this might be beyond the scope > of this patchset and I'm not sure how hard it is, but if you are interested > in this issue, that's really nice. > > Thanks, > Naoya Horiguchi