Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp497623ybb; Fri, 20 Mar 2020 03:02:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv1ezOhb+xNahm3L09y0nutyU2r/ArJeDZkzaoDpv955kwpjmLLuE9tw/OEkuVK6w04KFnw X-Received: by 2002:aca:edcf:: with SMTP id l198mr5604768oih.97.1584698553976; Fri, 20 Mar 2020 03:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584698553; cv=none; d=google.com; s=arc-20160816; b=kLdz9glgd6cXxcSB2kCF+BAMyfkW/22fz8SNOqtHbLZDdqn8QesEbjf4ofkq1VPe3c bCTZsm3pmnB45IbHx57gaiXuzH2N2hCTSxea99eBlAZEqa7ZktjTKaRSRiUEMCx+FGoZ FEz/94m/5KhEaH5kEaFqT2GjZy7YBcBpbLeNke8YPD5zbsGg11mYbtq+BA+q7bIINSv6 TvuSqZP4d+gVpcms38Chx77nt9x6PtQ5sHU1YlyHw+7o5g0OBuO+0dZzqTLaPuctto+/ OGuwABfeBNwaqV8b/W0IScD61iMg5abZtc/weZvPqzVgEuXcfZKVpjZ0MBtcBfr4q6kD aLIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WzV2FN2ok/NhA5NWpOHsyZ7D0zfIBp3v9eJJSSNVJkQ=; b=eijcMsh/5QSwwMTRaO3BCCV5nGFh5B41a763aBje3QtnmIUbNPXxEorGNq/VX9KOOQ h9ZpXexPVgteeUH5Y133xR+u9aNCFMZbSs8Z5zzIJJ8+t3ncfREDtPgmgFq2ZpMAKGEQ jHrm4Olf0vsbLYopPDdWt5l97aBnl0h5Xi4QbYH1Ak2fdA6GycrRJdY69D4NpnJwZ+tm yRIhZSf1Jh8USoaGHmVuoTdR0HNUQrD1mswBiMHcthWaU13gDTuMQyghIrzUvk1INXmL i3CFvr81qL6hK4HyvOFgSvi1vpNyZeEoJh3BycYOYVOlwdwA7Axrn86iCJVCbF91vYIV IT5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ldf/NL40"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15si2308371otb.8.2020.03.20.03.02.16; Fri, 20 Mar 2020 03:02:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ldf/NL40"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726954AbgCTKBw (ORCPT + 99 others); Fri, 20 Mar 2020 06:01:52 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:36977 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbgCTKBw (ORCPT ); Fri, 20 Mar 2020 06:01:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584698510; 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: in-reply-to:in-reply-to:references:references; bh=WzV2FN2ok/NhA5NWpOHsyZ7D0zfIBp3v9eJJSSNVJkQ=; b=Ldf/NL400QFhgIEG3vM8AetYxopBl16vVyQA+9FL2dEnNU3V/l57e/8PEax+gqjeWHQ++H uz1LpixKVICa5j9Sn6UCjeq3MB0nckrjlrrqWCPWO+t5Fp7inyeyCbLObK75nxmssMuk8o vE+XkRrQuVD9Pav/wdhDMbGQ96yqFZI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-333-w0dPq5DaN-2l2TxvoiClSQ-1; Fri, 20 Mar 2020 06:01:49 -0400 X-MC-Unique: w0dPq5DaN-2l2TxvoiClSQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0130418B5F78; Fri, 20 Mar 2020 10:01:33 +0000 (UTC) Received: from localhost (ovpn-13-97.pek2.redhat.com [10.72.13.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83DD396F92; Fri, 20 Mar 2020 10:01:30 +0000 (UTC) Date: Fri, 20 Mar 2020 18:01:27 +0800 From: Baoquan He To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, Vitaly Kuznetsov , Yumei Huang , Igor Mammedov , Eduardo Habkost , Milan Zamazal , Andrew Morton , Benjamin Herrenschmidt , Greg Kroah-Hartman , Haiyang Zhang , "K. Y. Srinivasan" , Michael Ellerman , Michal Hocko , Michal Hocko , Oscar Salvador , Paul Mackerras , "Rafael J. Wysocki" , Stephen Hemminger , Wei Liu , Wei Yang Subject: Re: [PATCH v3 0/8] mm/memory_hotplug: allow to specify a default online_type Message-ID: <20200320100127.GG2987@MiWiFi-R3L-srv> References: <20200319131221.14044-1-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200319131221.14044-1-david@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/19/20 at 02:12pm, David Hildenbrand wrote: > Distributions nowadays use udev rules ([1] [2]) to specify if and > how to online hotplugged memory. The rules seem to get more complex with > many special cases. Due to the various special cases, > CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE cannot be used. All memory hotplug > is handled via udev rules. > > Everytime we hotplug memory, the udev rule will come to the same > conclusion. Especially Hyper-V (but also soon virtio-mem) add a lot of > memory in separate memory blocks and wait for memory to get onlined by user > space before continuing to add more memory blocks (to not add memory faster > than it is getting onlined). This of course slows down the whole memory > hotplug process. > > To make the job of distributions easier and to avoid udev rules that get > more and more complicated, let's extend the mechanism provided by > - /sys/devices/system/memory/auto_online_blocks > - "memhp_default_state=" on the kernel cmdline > to be able to specify also "online_movable" as well as "online_kernel" > > v2 -> v3: > - "hv_balloon: don't check for memhp_auto_online manually" > -- init_completion() before register_memory_notifier() > - Minor typo fix > > v1 -> v2: > - Tweaked some patch descriptions > - Added > -- "powernv/memtrace: always online added memory blocks" > -- "hv_balloon: don't check for memhp_auto_online manually" > -- "mm/memory_hotplug: unexport memhp_auto_online" > - "mm/memory_hotplug: convert memhp_auto_online to store an online_type" > -- No longer touches hv/memtrace code Ack the series. Reviewed-by: Baoquan He