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 3C861C433F5 for ; Sun, 24 Apr 2022 02:00:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6CE6E6B0074; Sat, 23 Apr 2022 22:00:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 67DEB6B0075; Sat, 23 Apr 2022 22:00:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 545286B0078; Sat, 23 Apr 2022 22:00:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 4246C6B0074 for ; Sat, 23 Apr 2022 22:00:29 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 10DF4819ED for ; Sun, 24 Apr 2022 02:00:29 +0000 (UTC) X-FDA: 79390118178.27.00C319B Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by imf10.hostedemail.com (Postfix) with ESMTP id 95066C0037 for ; Sun, 24 Apr 2022 02:00:22 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KmBCp4fXkz1JBJC; Sun, 24 Apr 2022 09:59:34 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sun, 24 Apr 2022 10:00:23 +0800 Subject: Re: [PATCH v13 3/7] pagemap,pmem: Introduce ->memory_failure() To: Shiyang Ruan CC: , , , , , Christoph Hellwig , , , , , References: <20220419045045.1664996-1-ruansy.fnst@fujitsu.com> <20220419045045.1664996-4-ruansy.fnst@fujitsu.com> <4a808b12-9215-9421-d114-951e70764778@fujitsu.com> From: Miaohe Lin Message-ID: Date: Sun, 24 Apr 2022 10:00:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <4a808b12-9215-9421-d114-951e70764778@fujitsu.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.255 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 95066C0037 X-Rspam-User: X-Stat-Signature: 9rmn47an7wfk51f1nr1pz77uj18g3ddj X-HE-Tag: 1650765622-122261 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 2022/4/22 15:06, Shiyang Ruan wrote: > > ... >> >> Thanks for your patch. There are two questions: >> >> 1.Is dax_lock_page + dax_unlock_page pair needed here? > > They are moved into mf_generic_kill_procs() in Patch2.  Callback will implement its own dax lock/unlock method.  For example, for mf_dax_kill_procs() in Patch4, we implemented dax_lock_mapping_entry()/dax_unlock_mapping_entry() for it. > >> 2.hwpoison_filter and SetPageHWPoison will be handled by the callback or they're just ignored deliberately? > > SetPageHWPoison() will be handled by callback or by mf_generic_kill_procs(). > > hwpoison_filter() is moved into mf_generic_kill_procs() too.  The callback will make sure the page is correct, so it is ignored. I see this when I read the other patches. Many thanks for clarifying! > > > -- > Thanks, > Ruan. > >> >> Thanks! >> >>>       rc = mf_generic_kill_procs(pfn, flags, pgmap); >>>   out: >>>       /* drop pgmap ref acquired in caller */ >>> >> > > > .