From nobody Mon Feb 9 03:13:02 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1596187172; cv=none; d=zohomail.com; s=zohoarc; b=EAMB90XN4f8fg0P3giamqJidQ9X7Qs8FJxVAz7RsKu2Pou02BMGQCD/50Zc2utH8BEQ6myiRDone0WahG/IQEnUP0deL53X9ntcP/g2ubkmDMSXioly/PWPNLlOBdeP3fTQoTTr+YDnW7oMDuSmzclWHAB9hPg202nuUOIzBwmE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596187172; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1ITjza8QZs334kZDawRKP4E/FGkviB+rOAxL++W/FFU=; b=X8tTgfFxfSmRPx58RFox64OYZZbcYzx3X6LUc7y6FyAIBDU0sHDgahK2A2wSORnzLvBw1Yx3b+Js+srhWqnB+kb3W1wMARqb+SdapnVdUBx9wIa4vXDgCstINsw3t61y7PpBHQZh+e18XWGVXXSaBBueDuVZU3MBn0NM/p16IIw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1596187172235645.9262370609586; Fri, 31 Jul 2020 02:19:32 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k1RC9-0000al-2e; Fri, 31 Jul 2020 09:19:17 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k1RC7-0000Wj-Pr for xen-devel@lists.xenproject.org; Fri, 31 Jul 2020 09:19:15 +0000 Received: from us-smtp-1.mimecast.com (unknown [205.139.110.61]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id e5293f84-d30e-11ea-ab95-12813bfff9fa; Fri, 31 Jul 2020 09:19:11 +0000 (UTC) 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-352-w-XOsNLgPyeml39HbUP41A-1; Fri, 31 Jul 2020 05:19:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F36F801504; Fri, 31 Jul 2020 09:19:05 +0000 (UTC) Received: from t480s.redhat.com (ovpn-113-22.ams2.redhat.com [10.36.113.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 035EC1A835; Fri, 31 Jul 2020 09:18:59 +0000 (UTC) X-Inumbo-ID: e5293f84-d30e-11ea-ab95-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596187151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1ITjza8QZs334kZDawRKP4E/FGkviB+rOAxL++W/FFU=; b=D/HxuniBO2RN0kp9Zkm3YpHn+w9DEuPfw9K2pbvYWH1mKV4tntKnmq2yQC+y3q4a5W4M2A wyz2S6sSz0B4nIqvPCzpOee0ijPcp/TUvX96JrJtuytnVzA7uf6OuDlnZ2S+Sr0PE0ugtT jcPgO0U+4y+UWEBRrmiVTyTYQ/z92co= X-MC-Unique: w-XOsNLgPyeml39HbUP41A-1 From: David Hildenbrand To: linux-kernel@vger.kernel.org Subject: [PATCH RFCv1 5/5] hv_balloon:: try to merge "System RAM" resources Date: Fri, 31 Jul 2020 11:18:38 +0200 Message-Id: <20200731091838.7490-6-david@redhat.com> In-Reply-To: <20200731091838.7490-1-david@redhat.com> References: <20200731091838.7490-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: linux-hyperv@vger.kernel.org, Michal Hocko , Stephen Hemminger , David Hildenbrand , Haiyang Zhang , Wei Liu , virtualization@lists.linux-foundation.org, linux-mm@kvack.org, xen-devel@lists.xenproject.org, Andrew Morton , "K. Y. Srinivasan" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Let's reuse the new mechanism to merge "System RAM" resources below the root. We are the only one hotplugging "System RAM" and DIMMs don't apply, so this is safe to use. Cc: Andrew Morton Cc: Michal Hocko Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Signed-off-by: David Hildenbrand --- drivers/hv/hv_balloon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 32e3bc0aa665a..0745f7cc1727b 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -745,6 +745,9 @@ static void hv_mem_hot_add(unsigned long start, unsigne= d long size, has->covered_end_pfn -=3D processed_pfn; spin_unlock_irqrestore(&dm_device.ha_lock, flags); break; + } else { + /* Try to reduce the number of "System RAM" resources. */ + merge_child_mem_resources(&iomem_resource, "System RAM"); } =20 /* --=20 2.26.2