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 503B8C54EE9 for ; Thu, 22 Sep 2022 13:33:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CB07C80008; Thu, 22 Sep 2022 09:33:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C5FD080007; Thu, 22 Sep 2022 09:33:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B27B980008; Thu, 22 Sep 2022 09:33:16 -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 A294A80007 for ; Thu, 22 Sep 2022 09:33:16 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 69D9280CC5 for ; Thu, 22 Sep 2022 13:33:16 +0000 (UTC) X-FDA: 79939812792.25.4B87422 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf10.hostedemail.com (Postfix) with ESMTP id 50EE6C009D for ; Thu, 22 Sep 2022 13:33:13 +0000 (UTC) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MYGMb5Js6zlXK8; Thu, 22 Sep 2022 21:28:59 +0800 (CST) Received: from dggpemm100009.china.huawei.com (7.185.36.113) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 21:33:08 +0800 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.2375.31; Thu, 22 Sep 2022 21:33:07 +0800 Subject: Re: [PATCH v2 0/9] mm: Use hotplug_memory_notifier() instead of register_hotmemory_notifier() To: Waiman Long , Andrew Morton , Zefan Li , "Christoph Lameter" References: <20220920025123.2868953-1-liushixin2@huawei.com> <835004ff-3bae-7b08-b072-7e971891ba1f@redhat.com> CC: , Kefeng Wang From: Liu Shixin Message-ID: <370ba172-d0dd-ea0e-aa0c-5728308fe253@huawei.com> Date: Thu, 22 Sep 2022 21:33:07 +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: <835004ff-3bae-7b08-b072-7e971891ba1f@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.24] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100009.china.huawei.com (7.185.36.113) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663853596; a=rsa-sha256; cv=none; b=2kplUyzjf8uGyOaf6F6Wq5sX0IJSbcIbSNDLlXUqV1d3fxrDvczCgLbfhJc/BYeepLLXgX PzptDp6nvuRf+HG7tp/NhSE9CH0uSNviFD7et+UxDC7TgikFlhVgl5Ku8ikAUABj/imPU1 ysvkmNfbIF9y0GsDPB6unycsPOXdQ7w= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.187 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=1663853596; 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=60pbz2H6C/1v1TV1YaU8/tCGMjMbp32LrRcWcgH7/L8=; b=S54zWe5PydSEoSvGvyquGzvj8/M/LUmjcnpJkSGiHL8SG9ckXlbwGKyGIG43B1cJPSbQm3 polTg7eo6PpSybeUPdqx4BOKORvY33HQHoNU4iCtWXD3I6gm0hf5o9z5tq4lPGWVZkNLkR j9juMk3N9FtAfeb6a+QeaniEgpMif5s= X-Stat-Signature: hg8fo9caj8kemd9qrkg9j5nestzh38i3 X-Rspamd-Queue-Id: 50EE6C009D Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf10.hostedemail.com: domain of liushixin2@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=liushixin2@huawei.com X-Rspam-User: X-Rspamd-Server: rspam01 X-HE-Tag: 1663853593-243146 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/9/20 22:22, Waiman Long wrote: > On 9/19/22 22:51, Liu Shixin wrote: >> Patch f02c69680088 introduced register_hotmemory_notifier() to avoid a >> compile problem with gcc-4.4.4: >> >> When CONFIG_MEMORY_HOTPLUG=n, we don't want the memory-hotplug notifier >> handlers to be included in the .o files, for space reasons. >> The existing hotplug_memory_notifier() tries to handle this but testing >> with gcc-4.4.4 shows that it doesn't work - the hotplug functions are >> still present in the .o files. >> >> Since patch 316346243be6 has already updated the minimum gcc version to 5.1. >> The previous problem mentioned in patch f02c69680088 is not existed. So we >> can now revert to use hotplug_memory_notifier() directly rather than >> register_hotmemory_notifier(). >> >> Patch [1-6] replace register_hotmemory_notifier() with hotplug_memory_notifier() >> for every caller. >> Patch [7] remove unused register_hotmemory_notifier(). >> Patch [8] replace IPC_CALLBACK_PRI with MM_BATCH_CALLBACK_PRI. >> Patch [9] collect all priority of hotplug memory callback into include/linux/memory.h >> for easy reading. >> >> v1->v2: fix compile error of patch [4,5]. > > I agreed with David's comments about patch 8 and 9. My understanding is that this patch series makes it easy to see all the priorities of the various memory hotplug notifier callbacks and hence their calling order. It is kind of being stated when mentioning about patch 9 above. However, it should be more prominently mentioned as the first thing that I look for is the benefit provided by this patch series. > > Cheers, > Longman > > . I'll rewrite the commit log. Thanks,