From patchwork Sun Feb 9 10:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 11372047 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66B38109A for ; Sun, 9 Feb 2020 10:48:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24DE920733 for ; Sun, 9 Feb 2020 10:48:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="f4FWiSKz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24DE920733 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 606996B0007; Sun, 9 Feb 2020 05:48:40 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5B8FE6B0008; Sun, 9 Feb 2020 05:48:40 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CBBE6B000A; Sun, 9 Feb 2020 05:48:40 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0133.hostedemail.com [216.40.44.133]) by kanga.kvack.org (Postfix) with ESMTP id 32B0A6B0007 for ; Sun, 9 Feb 2020 05:48:40 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CBBDD824805A for ; Sun, 9 Feb 2020 10:48:39 +0000 (UTC) X-FDA: 76470265158.14.limit57_2e763a5067326 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,bhe@redhat.com,:linux-kernel@vger.kernel.org::akpm@linux-foundation.org:dan.j.williams@intel.com:richardw.yang@linux.intel.com:david@redhat.com:bhe@redhat.com,RULES_HIT:30003:30012:30054:30070,0,RBL:207.211.31.81:@redhat.com:.lbl8.mailshell.net-62.18.0.100 66.10.201.10,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: limit57_2e763a5067326 X-Filterd-Recvd-Size: 3051 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Sun, 9 Feb 2020 10:48:39 +0000 (UTC) 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 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: 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(-)