Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp514785ybv; Thu, 20 Feb 2020 02:40:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxH0VhHUUA/S9DtYU0kqkP1jb9a3rh5z/+b9vY7MzLj23EPwZiuE4V5g7v1T5h5h59nMBw5 X-Received: by 2002:aca:c551:: with SMTP id v78mr1467189oif.161.1582195223779; Thu, 20 Feb 2020 02:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582195223; cv=none; d=google.com; s=arc-20160816; b=Q2mPhXwVv3vK+0Xefdd7WLQlMcY0YhWS/zPIr+/g4z2b8NeprSM+g0yZQxR6wvQ+rn AyHdvBGXoGpn2EOE663xG9BdLS8RSj7aiwSHQJwI9GbB2D01SecuyNsq4QRIsTZqM0eB KgcT5jYzZnrv4GqrFJdfkmNRFAfVC4h7KFIQjXK7XsHcGmpv9GIBEfC5uq4qahbKcTSd 4/M+i+LdZepERN7xZFce7Woha6lYGP5doD8ijWExbW+E+sJ4zy5UZDlh5guOImU3Tm7W 6sHXqa0JYpFz/jhx0Yho8Q2PPZcAbk5nVbcj+1erTFsy4VE0m0L4x7YsSWp9RyuJlwbG wQZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Ht1b2Gn12WUgyUngBOy6cF6YFNd2DyC26HhQ0+Z/imw=; b=0gQH65+3UbfWADS0zY+q9JSaIKseeXnoEOL00hvXlKLgbL7ROwFJmNG11Ne80lE/xJ 5gid7dwZhLpmco44OgOpPVCPTWIIYgX/+J/StLMpK3x1LckLETZAER77dyLua9kRljrs 76CjX07tjaGOrVqovaJ5tfnG2hX2FO4oL47HDdKNGzWCfLzVmanGoIMM0T7V/4JSDX1J /vxxDMBeXrmhUIYytUj8JEtgrJWnG5QBZDy3WDu99Jszw3VmkBynjLOJmiPXjhJUQOO3 gzpky4ijF5/F8soKLXkjLVPovFzZo0jTVKoV1H69i+bsa0PVCnAd+2eCCBSU7csCLR13 y/Qg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si1489362otq.148.2020.02.20.02.40.11; Thu, 20 Feb 2020 02:40:23 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727545AbgBTKix (ORCPT + 99 others); Thu, 20 Feb 2020 05:38:53 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38722 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbgBTKix (ORCPT ); Thu, 20 Feb 2020 05:38:53 -0500 Received: by mail-wr1-f66.google.com with SMTP id e8so4029676wrm.5 for ; Thu, 20 Feb 2020 02:38:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ht1b2Gn12WUgyUngBOy6cF6YFNd2DyC26HhQ0+Z/imw=; b=pPvECpqze1JTo8iFOWJcZyZvIn/nlzyOtmaTANlaqersOdPXTtBU7HNjYhvDufZiYg uySVBkzB4oK99LagzHeWtvlR90brmTTL/rdv+ipRQSzB1wmb0G8pfgHBcVyuFm+dcekH 5tMBSVZlJA43YH7iIPLyo9jshQ2R4Wl7Wjm+0mbR7gaYVKvf0ZWWSdL1JfPd2juQnUmq ZHcklZjSK3VX4EAKHwqAqLwpe1Elp0tOVI3McoRPcfNpcsQB+m3qrwiAo1rABZUPUg1k K7+kcP9sfHVLddDGRJomaoyzBCCQQ6dV0cKWoUPKR+BiNJx1WGuB05/0FtkCcLFnn8AW GqHQ== X-Gm-Message-State: APjAAAUIc81lazLVxD1/Zkr+6Q/NHE3c+y1UNpbnbyCFqxxsDVKuVizI DJ8QJG8wUbx1OjiILzwyawA= X-Received: by 2002:adf:d4c7:: with SMTP id w7mr42913682wrk.101.1582195131500; Thu, 20 Feb 2020 02:38:51 -0800 (PST) Received: from localhost (ip-37-188-133-21.eurotel.cz. [37.188.133.21]) by smtp.gmail.com with ESMTPSA id b17sm4061890wrp.49.2020.02.20.02.38.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2020 02:38:50 -0800 (PST) Date: Thu, 20 Feb 2020 11:38:49 +0100 From: Michal Hocko To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, richardw.yang@linux.intel.com, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, rppt@linux.ibm.com, robin.murphy@arm.com Subject: Re: [PATCH v2 0/7] mm/hotplug: Only use subsection map in VMEMMAP case Message-ID: <20200220103849.GG20509@dhcp22.suse.cz> References: <20200220043316.19668-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200220043316.19668-1-bhe@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 20-02-20 12:33:09, Baoquan He wrote: > Memory sub-section hotplug was added to fix the issue that nvdimm could > be mapped at non-section aligned starting address. A subsection map is > added into struct mem_section_usage to implement it. However, sub-section > is only supported in VMEMMAP case. Why? Is there any fundamental reason or just a lack of implementation? VMEMMAP should be really only an implementation detail unless I am missing something subtle. > Hence there's no need to operate > subsection map in SPARSEMEM|!VMEMMAP case. In this patchset, change > codes to make sub-section map and the relevant operation only available > in VMEMMAP case. > > And since sub-section hotplug added, the hot add/remove functionality > have been broken in SPARSEMEM|!VMEMMAP case. Wei Yang and I, each of us > make one patch to fix one of the failures. In this patchset, the patch > 1/7 from me is used to fix the hot remove failure. Wei Yang's patch has > been merged by Andrew. Not sure I understand. Are there more issues to be fixed? > include/linux/mmzone.h | 2 + > mm/sparse.c | 178 +++++++++++++++++++++++++++++------------ > 2 files changed, 127 insertions(+), 53 deletions(-) Why do we need to add so much code to remove a functionality from one memory model? -- Michal Hocko SUSE Labs