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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A96BEC433ED for ; Fri, 7 May 2021 11:55:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F029C613F0 for ; Fri, 7 May 2021 11:55:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F029C613F0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 805CE8D0010; Fri, 7 May 2021 07:55:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B5A68D000B; Fri, 7 May 2021 07:55:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 669238D0010; Fri, 7 May 2021 07:55:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0232.hostedemail.com [216.40.44.232]) by kanga.kvack.org (Postfix) with ESMTP id 4D5AB8D000B for ; Fri, 7 May 2021 07:55:29 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 09A22180AD81A for ; Fri, 7 May 2021 11:55:29 +0000 (UTC) X-FDA: 78114279978.16.CD9D256 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf22.hostedemail.com (Postfix) with ESMTP id EDE41C0007EB for ; Fri, 7 May 2021 11:55:20 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1620388527; h=from:from:reply-to: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=AVo4dmnTS1B3YIat+/C81/Fhwd2ollcjvflB6s+6QMM=; b=s7+ZERkyEG2++IavH8Rzs4k3w933FNTyYNdb8CFD/nI3YXBbqrAyrCCsjKHgbK1lNbWE9r xYHdOfjETLkMTyWmPsTrvf41JNPbzOfWO1uA2GUq7dL9LLMPcxY1jp14+IuRwVnVg4Q7Qa IVwzVTvDsktZvsRj+t9jh+HvpYT86Rg= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1D06EB159; Fri, 7 May 2021 11:55:27 +0000 (UTC) Date: Fri, 7 May 2021 13:55:24 +0200 From: Michal Hocko To: Zi Yan , David Hildenbrand Cc: Oscar Salvador , Michael Ellerman , Benjamin Herrenschmidt , Thomas Gleixner , x86@kernel.org, Andy Lutomirski , "Rafael J . Wysocki" , Andrew Morton , Mike Rapoport , Anshuman Khandual , Dan Williams , Wei Yang , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Subject: Re: [RFC PATCH 0/7] Memory hotplug/hotremove at subsection size Message-ID: References: <20210506152623.178731-1-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=s7+ZERky; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf22.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.15 as permitted sender) smtp.mailfrom=mhocko@suse.com X-Stat-Signature: yku95de85xk969c8ct7fku19ezw7jku6 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: EDE41C0007EB Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf22; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620388520-206981 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: [I haven't read through respective patches due to lack of time but let me comment on the general idea and the underlying justification] On Thu 06-05-21 17:31:09, David Hildenbrand wrote: > On 06.05.21 17:26, Zi Yan wrote: > > From: Zi Yan > > > > Hi all, > > > > This patchset tries to remove the restriction on memory hotplug/hotremove > > granularity, which is always greater or equal to memory section size[1]. > > With the patchset, kernel is able to online/offline memory at a size independent > > of memory section size, as small as 2MB (the subsection size). > > ... which doesn't make any sense as we can only online/offline whole memory > block devices. Agreed. The subsection thingy is just a hack to workaround pmem alignement problems. For the real memory hotplug it is quite hard to argue for reasonable hotplug scenarios for very small physical memory ranges wrt. to the existing sparsemem memory model. > > The motivation is to increase MAX_ORDER of the buddy allocator and pageblock > > size without increasing memory hotplug/hotremove granularity at the same time, > > Gah, no. Please no. No. Agreed. Those are completely independent concepts. MAX_ORDER is can be really arbitrary irrespective of the section size with vmemmap sparse model. The existing restriction is due to old sparse model not being able to do page pointer arithmetic across memory sections. Is there any reason to stick with that memory model for an advance feature you are working on? -- Michal Hocko SUSE Labs