From nobody Sun Feb 8 14:35:27 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=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599729311; cv=none; d=zohomail.com; s=zohoarc; b=EeYNTHn5u2GT9LVi5e1TOQMLppCydjPb5JTZW5eWHJMBszHk7WBe0/r6Fq55HHwuUVMmecAqx5EjQQfhmRavl7lnZ+N9JvVrWvcQFUDGOU4eHlgMx4newlwC0byKmRM7gtMhYUHYOrCb4OL/uPyGzBV4STUSeZZf6ocULQQRPoI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599729311; 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=YsfsAQ2XAkLrSeK5gDaCbmO+kEOKaYFgY1Wng1dGBy0=; b=ZOVaD1saDPebcNZ0YpiWfXHNckE7X1GYTcOzDNwyZjvlc48L5t7RGfNtVJdhEomfMr93VB5rBCyl4jr/3YHss751ZTPpFfeo6GPt8ko/C35WHaVEiCM5YMI6sizi85XRL1NpYFs7CmQxtXiXt8D93ltr7/1HBPpOxXP2AYRNrZQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 159972931177597.53912038017336; Thu, 10 Sep 2020 02:15:11 -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 1kGIfP-0007Ug-Pu; Thu, 10 Sep 2020 09:14:55 +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 1kGIfO-0007N3-Tc for xen-devel@lists.xenproject.org; Thu, 10 Sep 2020 09:14:54 +0000 Received: from us-smtp-delivery-1.mimecast.com (unknown [207.211.31.81]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id b512b1d0-809e-442d-a9ee-a67d53fbe19e; Thu, 10 Sep 2020 09:14:50 +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-475-HBflxYiUOtC-j12zoJgTEQ-1; Thu, 10 Sep 2020 05:14:47 -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 A191D109106C; Thu, 10 Sep 2020 09:14:45 +0000 (UTC) Received: from t480s.redhat.com (ovpn-113-88.ams2.redhat.com [10.36.113.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 445081A8EC; Thu, 10 Sep 2020 09:14:42 +0000 (UTC) X-Inumbo-ID: b512b1d0-809e-442d-a9ee-a67d53fbe19e DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599729290; 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=YsfsAQ2XAkLrSeK5gDaCbmO+kEOKaYFgY1Wng1dGBy0=; b=jBD8d3IaJ49ZAwxYEBbAZ+sU26PuT8Oen02s5j4OMsk2VEUITsK6wukEc7KFt+6HhE6h1a ag7e8VF3dFczDQhtChITEmGxss7JlMQW6OY5OCVdhZSdu/nu2oo+LcPr4u8J8woD0/VFgZ pr+IrP9c48dwLgb0B36Yq9ffKZq2L+c= X-MC-Unique: HBflxYiUOtC-j12zoJgTEQ-1 From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: virtualization@lists.linux-foundation.org, linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-s390@vger.kernel.org, Andrew Morton , David Hildenbrand , Wei Liu , Michal Hocko , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Pankaj Gupta , Baoquan He , Wei Yang Subject: [PATCH v3 7/7] hv_balloon: try to merge system ram resources Date: Thu, 10 Sep 2020 11:13:40 +0200 Message-Id: <20200910091340.8654-8-david@redhat.com> In-Reply-To: <20200910091340.8654-1-david@redhat.com> References: <20200910091340.8654-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: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Let's try to merge system ram resources we add, to minimize the number of resources in /proc/iomem. We don't care about the boundaries of individual chunks we added. Reviewed-by: Wei Liu Cc: Andrew Morton Cc: Michal Hocko Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 3c0d52e244520..b64d2efbefe71 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_balloon.c @@ -726,7 +726,7 @@ static void hv_mem_hot_add(unsigned long start, unsigne= d long size, =20 nid =3D memory_add_physaddr_to_nid(PFN_PHYS(start_pfn)); ret =3D add_memory(nid, PFN_PHYS((start_pfn)), - (HA_CHUNK << PAGE_SHIFT), MHP_NONE); + (HA_CHUNK << PAGE_SHIFT), MEMHP_MERGE_RESOURCE); =20 if (ret) { pr_err("hot_add memory failed error is %d\n", ret); --=20 2.26.2