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 1D194C54EE9 for ; Tue, 20 Sep 2022 14:22:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 33433940008; Tue, 20 Sep 2022 10:22:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E381940007; Tue, 20 Sep 2022 10:22:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D234940008; Tue, 20 Sep 2022 10:22:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0E418940007 for ; Tue, 20 Sep 2022 10:22:25 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C9966C0367 for ; Tue, 20 Sep 2022 14:22:24 +0000 (UTC) X-FDA: 79932679008.26.2177180 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf24.hostedemail.com (Postfix) with ESMTP id 2F89D180004 for ; Tue, 20 Sep 2022 14:22:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663683742; h=from:from: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=sSLgmaNUgFDSUzJ4a2gMfvfybjQWSFBvQiKUfTdQlIY=; b=WGygLgjeTb7b+mhd4JiYh/Mm28qllEWEbufMg+dQwduz4AzLRXdfMAmbNOyfO9HV2oLsoa 1FZdlrtblTKz8qcfwlzCrzI9POOcTtHV8Dcwq6EFpgrK5erlMLQnfQ/LeSAJW8arX26DQQ D/WXy1hNJMcRG1O+2A7qMSmcC37UP7U= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-647-thaOLhMxMg6BINBVFOishg-1; Tue, 20 Sep 2022 10:22:17 -0400 X-MC-Unique: thaOLhMxMg6BINBVFOishg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C3312999B22; Tue, 20 Sep 2022 14:22:16 +0000 (UTC) Received: from [10.22.34.82] (unknown [10.22.34.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02799492B05; Tue, 20 Sep 2022 14:22:15 +0000 (UTC) Message-ID: <835004ff-3bae-7b08-b072-7e971891ba1f@redhat.com> Date: Tue, 20 Sep 2022 10:22:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v2 0/9] mm: Use hotplug_memory_notifier() instead of register_hotmemory_notifier() To: Liu Shixin , Andrew Morton , Zefan Li , Christoph Lameter Cc: linux-mm@kvack.org, Kefeng Wang References: <20220920025123.2868953-1-liushixin2@huawei.com> From: Waiman Long In-Reply-To: <20220920025123.2868953-1-liushixin2@huawei.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WGygLgje; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf24.hostedemail.com: domain of longman@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=longman@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663683744; a=rsa-sha256; cv=none; b=QFlnPO4S72Xht3ihV92NOZp3KaKpmqMCeAexYbzhNovfiINjLpttxmhv9OcGoN75fyPWCs kf8OB7AKrOAvcfxJtyJ0DCaaE+cxE0hFv1nRYhOpiiy+w5h70QRu+q/u9TH9Rtp5fbLVHU 0FILFrd/9CVkl2uj4BBcJ0Z1GZBuNVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663683744; 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:dkim-signature; bh=sSLgmaNUgFDSUzJ4a2gMfvfybjQWSFBvQiKUfTdQlIY=; b=QS0LMlZQIb88bpdeTgU+/mMoUlOnDudKzCJCmShdaMmS8Fay16QEMwjPvgbXw4qpLuUpnr it23uOqMJo/8e+ogWJSO/pBy2B7QwAoHido877cxqMSXdUgayZBajFUGpJdxFzLERBnCvw P5OLycjilMUcifditBzthWYbkuxm4gI= X-Stat-Signature: r3jwai4hhbmax66zs1s5k3hxar73qmdq X-Rspamd-Queue-Id: 2F89D180004 Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WGygLgje; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf24.hostedemail.com: domain of longman@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=longman@redhat.com X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1663683743-840866 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 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