Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5548293ybl; Tue, 10 Dec 2019 07:47:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzQwzBGqap8jOaYRWlQj2P6Vegh1dxb8h6u2ID0fdbWEqyHefe/2/j+VNzWw/xaHIY/4eUV X-Received: by 2002:aca:1c09:: with SMTP id c9mr4614370oic.85.1575992833474; Tue, 10 Dec 2019 07:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575992833; cv=none; d=google.com; s=arc-20160816; b=H1OjZXEISyhb+hKqHihT/3xsCT4Y7MjjMEPHJoxAdHzDx5/YQZ1dV74HNIPD4RQnzB G7hRR6WdbLRhhk1mP1Jfw6C4k1YVakh9ex3EblKY+Wgv0YV4FZOiTtVZnxl+6ASa3JSp pUEFnOmgaYH0m5HCkgWqaTL8kZEAwnmgZw8TS3GedohTA0yweuH1Jx3PNet9op8wEibV wNZL+6C0hYZvJK6+z/mBKor89YyN5Zp5P1Jud7c6lZGFkXUswLz4pQ6+iH3V9mEmEFS2 lgLUY9Usijx3Xa/p9fefzS0QPTTkX0Krxvr6wSGqi2OfW14L6rlaoizTeZVSWlgOCE4U /znQ== 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=SEVzYm5jNJz4VDppe7/WWH/36/csGHzBj+3YG9crYxM=; b=yPBJqvsaKn2hXv3/EWDmL8rSksxL5ZIFXbZElxQz0ksWTS5dvh81TZlGw0R/SaMctG mRkk+/KVIDAIixdBRXqppAIzVK0srno9lmupIFvqI9uTN91Hxzfat6CM77xiJ9kZANFo 4bZ1S+zByJD6IrmE2UXVKkpBx2EhoBOi/AcYDJz93BO9IUTImROLCFRNHqNkC5h9WQR1 Z4yBnhLga1q5lF6IAgpeaFcsTixSF025xka3+V+Oe7TahBaqcUHKcb+nzaYhujxWa34f 8TcIIjeFPjEI/VTjUAhXUTGPU8gDx2+5H35/+TI1Ccdgxi3Mc8mePiV9o7kUGW/jAbYL ZEuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eNKUlyZV; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c131si1681943oig.170.2019.12.10.07.46.58; Tue, 10 Dec 2019 07:47:13 -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=@gmail.com header.s=20161025 header.b=eNKUlyZV; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727436AbfLJPqZ (ORCPT + 99 others); Tue, 10 Dec 2019 10:46:25 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:42032 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbfLJPqZ (ORCPT ); Tue, 10 Dec 2019 10:46:25 -0500 Received: by mail-pl1-f196.google.com with SMTP id x13so28257plr.9; Tue, 10 Dec 2019 07:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=SEVzYm5jNJz4VDppe7/WWH/36/csGHzBj+3YG9crYxM=; b=eNKUlyZV+9AK1rbPzSc599PR8/HSVo0lodnmDdgldEBN+E8992+FTU0pFM/BGwnRcH JAxUwICUHyHn0fe2PDB8IPK5J2ulLLVCxPCSoIlVq8ink6QYMpUvg1wtEFYTmJtG0Aq4 FmagRIeEWF8vc3f1ZIDGXaygRrcXQp33KVybMXUp+hupPuuye2cNt4jaGv8NnO6Ppe5q VXiAhpSunwIaX/0TC1mVYTkVImYNC0+dqChCaIQNefOMfwRwAadw5Jf/TWrRIMxV8SeV WNhnXbn+tv/bK4U0imlAM3QUz5SYnzTbw+8Zatgv3E7/216iAUJUsnt7mvF7/g4XMaKl 97eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SEVzYm5jNJz4VDppe7/WWH/36/csGHzBj+3YG9crYxM=; b=sshqrgdjhvBwda3JhTZAOLU66b43vsew2XVdRlvYFg0pB8UCTvhdB/rxqHZz6cwO5o x7bPlzcpqIPVhAvLiMqjxYFJxWgjZy3/BiQeT3WGIjE5UUosQhWsMEMsvXyY7iQ/+RcY Wkol/J4lT/13MWZbjRMmizTxUsGqKZ1aS+0DMgXaouy8n+NnZgJrtf3B+8vOPtSpnLrW 3gv448C2J+8bdd0C/vycFevZdYH6wXOGfaEdxoWQeQxWQfWDkNSi0ZSHJEXonl7m96uD CLn6uZ6YgQrvDLEuKAt+GUIAPLmCuC9GZX4PJF/hLnrhSWph8tKkawL4puVpdd7LodEp oBrA== X-Gm-Message-State: APjAAAWQLC2OSsiZ4YsYf4pITonxqdEone3UyQA7RqPQ4Dr5N1EK6F63 WfCKr0StA84+yEsI6q5IROI= X-Received: by 2002:a17:902:aa8f:: with SMTP id d15mr36828933plr.80.1575992784728; Tue, 10 Dec 2019 07:46:24 -0800 (PST) Received: from localhost.corp.microsoft.com ([167.220.255.5]) by smtp.googlemail.com with ESMTPSA id k13sm4113815pfp.48.2019.12.10.07.46.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Dec 2019 07:46:24 -0800 (PST) From: lantianyu1986@gmail.com X-Google-Original-From: Tianyu.Lan@microsoft.com To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, sashal@kernel.org, akpm@linux-foundation.org, dan.j.williams@intel.com, jgg@ziepe.ca, dave.hansen@linux.intel.com, david@redhat.com, namit@vmware.com, richardw.yang@linux.intel.com, christophe.leroy@c-s.fr, tglx@linutronix.de, Tianyu.Lan@microsoft.com, osalvador@suse.de, michael.h.kelley@microsoft.com Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, vkuznets@redhat.com, eric.devolder@oracle.com Subject: [RFC PATCH 0/4] x86/Hyper-V: Add Dynamic memory hot-remove function Date: Tue, 10 Dec 2019 23:46:07 +0800 Message-Id: <20191210154611.10958-1-Tianyu.Lan@microsoft.com> X-Mailer: git-send-email 2.14.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tianyu Lan Hyper-V provides dynamic memory hot add/remove function. Memory hot-add has already enabled in Hyper-V balloon driver. Now add memory hot-remove function. Tianyu Lan (4): mm/resource: Move child to new resource when release mem region. mm/hotplug: Expose is_mem_section_removable() and offline_pages() Hyper-V/Balloon: Call add_memory() with dm_device.ha_lock. x86/Hyper-V: Add memory hot remove function drivers/hv/hv_balloon.c | 707 ++++++++++++++++++++++++++++++++++++++++++------ kernel/resource.c | 38 ++- mm/memory_hotplug.c | 2 + 3 files changed, 664 insertions(+), 83 deletions(-) -- 2.14.5