Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp265308pxj; Fri, 7 May 2021 08:12:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsA6DGRvEX8FmBtfFvBHLwYJh3SvR4RPr3yHM9wCdQF96UqzDg0Py96zNwnj+1ihuIg6ks X-Received: by 2002:a17:902:be02:b029:e6:bb0d:6c1e with SMTP id r2-20020a170902be02b02900e6bb0d6c1emr10177648pls.77.1620400321159; Fri, 07 May 2021 08:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620400321; cv=none; d=google.com; s=arc-20160816; b=tomhmAcsdr040hFm72VB2lsQE1tHfF8EYO9Af/mFnYbVnzTdzfs8fA8MTuty9c3dhr uipX3x39/KHxxQ9UGL8tenFU2mkR+N21AJHx0N5X6HhL9CWwkhsW46Vp6UvJDjA/v49b iXJLTa4BNEKXfuF3DCLBTc/QBr1AEQ1TKdpKy/3NxDIbTr5XL6VYp7+sFV4u74OUUL59 N9gDf6K71/EW+sRp7cdouJRlfXRg6f5wbrQZh08v11FYDrIFCtX3YdkbrcoYwlJnhFgZ D1enIz6KWiSFC7vXAVZx1hx1GQRkRUfC/ip3zif0sSoN9ISYHHu6yXKgvRkaBfSosBow i6Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AVo4dmnTS1B3YIat+/C81/Fhwd2ollcjvflB6s+6QMM=; b=y/K0WZb9tP8cLQfIErK7TPL8t+qFrwEDWHVWm5lxstEBneV2GzxH+++ow5b227vWyN uhAJz5ib91WCtncHFLW8Bcns/LvWKZ+2ulMIluhIZ7j6rIZQKgWSumTc53c8A0VEtsAE QobFJGl9O8o82cFHm5bl85ErRec1QiQYbNPRGHyhQGhQ2U+3b729CZCLoAb0oz2kB9iy FKT+b5KVsrkF/2Tu53GrbDiUv5cje1RMXARbnXyXDsFKoTGRMEWeSQUEiXVHUffHxWhG gqJr4ZOAq+Jmvcyf1IXPZ9K+9paAIEWibRVXS2L5xlOTVxAOARiOChc04pRVr0dcqpa/ NrOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s7+ZERky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h34si7114157pgl.179.2021.05.07.08.11.46; Fri, 07 May 2021 08:12:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s7+ZERky; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235255AbhEGL42 (ORCPT + 99 others); Fri, 7 May 2021 07:56:28 -0400 Received: from mx2.suse.de ([195.135.220.15]:41044 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230412AbhEGL41 (ORCPT ); Fri, 7 May 2021 07:56:27 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [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