Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7196598imu; Wed, 14 Nov 2018 13:19:09 -0800 (PST) X-Google-Smtp-Source: AJdET5fa8FQDqowUQw+HiW8NSbOm3/MRQyliOBquQWN46Wm3fWMhFMm2sRnclKFY9zdKF4uYb2oz X-Received: by 2002:a63:a30a:: with SMTP id s10mr3056202pge.234.1542230348958; Wed, 14 Nov 2018 13:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542230348; cv=none; d=google.com; s=arc-20160816; b=VqSIPuJcY0x4UZ7WDb3EIKFn05evyKhNEyuboehF3shOjMQPUXwvj37YICxMB4U8fK tpuGa2XEIEkKDISZJStaPKyDffc57KwyhhX1qPXNnNw8bkRVipIMwQDrpH0CKmIJZ9xm +PtWP9QC04d3rMXeEPQB7atqpj6G2oXWtKT4op09i3fxa5GM2q923I6H1+J8CUNM6WxD v0t4IZo6FsUVUb4j5JZxT8I/XTx7v2B5g4/7eyl702/Ws+eR3RtKs5X+1a37daH0PIZz zRuMQjd+DsSILcFp3TPn/BsGLwGB2vswj2KWHiPbIJ4p9GoeRDws/RlX8PgeHisUoFmi cGQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Nxtv3n9rUX3Umq56CPsblAVXzZrf0zdjcbISE72CVEo=; b=act0HZ3VceuFaLfZmCZD5yRnd4vGWF6bvWcfUHRO2obi2g+m5dlKC0z1k6zG2+1pI4 Jb1fBPAitt+oZI7czxx4DrzZVFFZuzKbfp+cZb++xdUVnQG5XQk/DL9DD4Ax2ss80Nk5 uGa22OCnn9UibsE0BpVma654GoG4ZslZz0tK9oDFdhLvg5NY6P7wbIN+3aaHg+5RcpOo oFPFZz8h4TyrO6bqOS7ne9K07kwXIwQ2dCDeu9s3hXE0Ec6ro39iXPH7FmdMUlIynIUH kVUQsN37jI1QUGHTYMm2/ejpARFThxeMpA4UOeRinhuibUF81pO3hsSw5r1IHshQE6A6 I2iA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 u8-v6si26966717plk.39.2018.11.14.13.18.53; Wed, 14 Nov 2018 13:19:08 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732964AbeKOHWu (ORCPT + 99 others); Thu, 15 Nov 2018 02:22:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54452 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728392AbeKOHWu (ORCPT ); Thu, 15 Nov 2018 02:22:50 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6CB3CC05250F; Wed, 14 Nov 2018 21:17:58 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-99.ams2.redhat.com [10.36.116.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id C18FC61493; Wed, 14 Nov 2018 21:17:46 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devel@linuxdriverproject.org, linux-fsdevel@vger.kernel.org, linux-pm@vger.kernel.org, xen-devel@lists.xenproject.org, David Hildenbrand , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Andrew Morton , Matthew Wilcox , Michal Hocko , "Michael S. Tsirkin" Subject: [PATCH RFC 4/6] xen/balloon: mark inflated pages PG_offline Date: Wed, 14 Nov 2018 22:17:02 +0100 Message-Id: <20181114211704.6381-5-david@redhat.com> In-Reply-To: <20181114211704.6381-1-david@redhat.com> References: <20181114211704.6381-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 14 Nov 2018 21:17:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- drivers/xen/balloon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 12148289debd..14dd6b814db3 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -425,6 +425,7 @@ static int xen_bring_pgs_online(struct page *pg, unsigned int order) for (i = 0; i < size; i++) { p = pfn_to_page(start_pfn + i); __online_page_set_limits(p); + __SetPageOffline(p); __balloon_append(p); } mutex_unlock(&balloon_mutex); @@ -493,6 +494,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); /* Relinquish the page back to the allocator. */ + __ClearPageOffline(page); free_reserved_page(page); } @@ -519,6 +521,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) state = BP_EAGAIN; break; } + __SetPageOffline(page); adjust_managed_page_count(page, -1); xenmem_reservation_scrub_page(page); list_add(&page->lru, &pages); -- 2.17.2