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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 47F94C11D04 for ; Thu, 20 Feb 2020 10:38:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 137682467A for ; Thu, 20 Feb 2020 10:38:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 137682467A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 93D576B0005; Thu, 20 Feb 2020 05:38:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8ED286B0006; Thu, 20 Feb 2020 05:38:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DC076B0007; Thu, 20 Feb 2020 05:38:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 64DDE6B0005 for ; Thu, 20 Feb 2020 05:38:53 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 22034181AEF1A for ; Thu, 20 Feb 2020 10:38:53 +0000 (UTC) X-FDA: 76510157346.03.pin05_1351451f2ae1e X-HE-Tag: pin05_1351451f2ae1e X-Filterd-Recvd-Size: 3706 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Thu, 20 Feb 2020 10:38:52 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id w12so4053309wrt.2 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=in9oDm58vySg6/OIKYmFrBY1+cMdjztoMCuqD8tqHo7bsSP+hQSFioEf3ERBU8mBkR wLKlJs9BaIfwkn2PL8JCxX67iHLdVVwXsrMTELSyML4n6wlhCMk9uiS/nf0C26QWmugC 3HLXUqEdZwBCWlvayFuyiqtIQizN0VIY6FvDBndONJrriX8tB2SOi5yY4cmsJ8xVjjpR Q92w6nw0m9IyIsO0kwJTJcxlZSERmSMe3bmsjCbndHGDbl64MXTyXSpEovnX3+w557Yb Y9+GZkTBk1wugKqkgbXV39cbny5nRzgNCwRqXjSuQdomqxMMF37v89RDXE/LeR1agdOv CiQw== X-Gm-Message-State: APjAAAWCtGKkhTojzI6EfTPFD/b7Uo9sKAri4E7rtEUMbNiR7kkQMaS7 4HuOxuabUlRDE9T8HA58n5s= X-Google-Smtp-Source: APXvYqx9uGPq79/Y37GnvXyltn1NCMABFOX+xrRpc44HyxfkCeZH95pJYQQfgSCA/8RHbNnLBE0JqQ== 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> 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 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