Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2589159ybv; Sun, 9 Feb 2020 02:49:12 -0800 (PST) X-Google-Smtp-Source: APXvYqx072NddgmEF4M35tXe4/YzM/uP1Qr04Yl1ht+zklvWY4+RGcEV+abPWbOQ0eCILTEJb6K5 X-Received: by 2002:a05:6830:1691:: with SMTP id k17mr6614002otr.282.1581245352025; Sun, 09 Feb 2020 02:49:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581245352; cv=none; d=google.com; s=arc-20160816; b=e2HFVwlcivAYwDDqLzJzb7r6Ta0TsZuwdv5tKMoudOCRF+Yo+oQY+L13R5wEB2IBwv kB2dUqqF/QTHeoavHrGgh2FfjxhyE+y/q+12CjxAl4qmfjh4gHn5hdjs1zhy0Z9fsLWq Yn8Y/yW6L0Lx01rDvLBtir+xwu9GIHbTJrK9mzkN8jMZnhjThjS6LtQGQ5RWun2V8q0c xx8RGbTASBE0aJKEdJ8hQz238TIvxSPQ6HB8m2QSzydf+bFNfHWcjD7aBIm73VfMYpvH eaAhCsebYNbym5a1e3QONwuf7LjUDCUdZ+qtkQ0Ogz3Pb6TrLPLmsiBd+4bOCER94sbR wv2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=z0Z0S0bd9YQeiqHAL6/0RXLiYTJOm2O0u4Uov4hCfLg=; b=ZHqPaOIAAwtg6CIbIeGdk2WJJBXbIG4SEMBTkrCppTnb9TYh6hZo/7qfxN5ifGFWCl Xr60ZfbnMtFDg4H7GnI0uUVhV8RZMVC2qiGqfqpG3Nh/TiwX7EINATaifcIqLXEtNxMx ZBwDEAF6O3HimNiS7OaNXWn6Jc6LxX7g3Y8GZjQ2UOZkZvdhpAVMbTxjT7m26cXQTn2A 7FO7uT15bsNNWTCOhQtpQXG9i2qfFfrADnhVJzIMmBJ4TwfKrejWDKdhCLM7aYF6rQad +fkc83hcDRofWKabxVHhfWF1vPjyG8bTY5tyk3cfNi30Djj9gGYKvrT9FPyMbtuyX63Z Ce5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f4FWiSKz; 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 w20si6356947oic.103.2020.02.09.02.48.45; Sun, 09 Feb 2020 02:49:12 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=f4FWiSKz; 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 S1727637AbgBIKsk (ORCPT + 99 others); Sun, 9 Feb 2020 05:48:40 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:56870 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726081AbgBIKsj (ORCPT ); Sun, 9 Feb 2020 05:48:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581245318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=z0Z0S0bd9YQeiqHAL6/0RXLiYTJOm2O0u4Uov4hCfLg=; b=f4FWiSKzXREhdq50S3xrhCiwG3tdpAxdZ83kdn3ELFrxZaOQPjTxPADlfsOqpKOzzZP+17 vPPy4GhT1kpVuW7KYUkmXT73SuKtqSQ7LKGVkEy1CN8HhLN9AYZGtYhDkp/A46or14WsLA BuZefoSbCPpmZlJunD3hpE50nFs9Gnk= 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-153-v04u3ZY7PoarzC_GXcgLKg-1; Sun, 09 Feb 2020 05:48:34 -0500 X-MC-Unique: v04u3ZY7PoarzC_GXcgLKg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 23F0310054E3; Sun, 9 Feb 2020 10:48:33 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-31.pek2.redhat.com [10.72.12.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id F404A10018FF; Sun, 9 Feb 2020 10:48:27 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, dan.j.williams@intel.com, richardw.yang@linux.intel.com, david@redhat.com, bhe@redhat.com Subject: [PATCH 0/7] mm/hotplug: Only use subsection in VMEMMAP case and fix hot add/remove failure in SPARSEMEM|!VMEMMAP case Date: Sun, 9 Feb 2020 18:48:19 +0800 Message-Id: <20200209104826.3385-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 implement it. However, sub-section is only supported in VMEMMAP case, there's no need to operate subsection map in SPARSEMEM|!VMEMMAP. The former 4 patches is for it. 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 issue. Baoquan He (6): mm/sparse.c: Introduce new function fill_subsection_map() mm/sparse.c: Introduce a new function clear_subsection_map() mm/sparse.c: only use subsection map in VMEMMAP case mm/sparse.c: Use __get_free_pages() instead in populate_section_memmap() mm/sparse.c: update code comment about section activate/deactivate mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case Wei Yang (1): mm/sparsemem: pfn_to_page is not valid yet on SPARSEMEM include/linux/mmzone.h | 2 + mm/sparse.c | 248 ++++++++++++++++++++++++++--------------- 2 files changed, 161 insertions(+), 89 deletions(-) -- 2.17.2