From patchwork Mon Nov 19 10:16:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10688379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C110514D6 for ; Mon, 19 Nov 2018 10:17:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADDC029C24 for ; Mon, 19 Nov 2018 10:17:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A24D629C27; Mon, 19 Nov 2018 10:17:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36A1829C24 for ; Mon, 19 Nov 2018 10:17:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 10E966B1A34; Mon, 19 Nov 2018 05:16:59 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 09A0E6B1A35; Mon, 19 Nov 2018 05:16:58 -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 E55506B1A36; Mon, 19 Nov 2018 05:16:58 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by kanga.kvack.org (Postfix) with ESMTP id B461D6B1A34 for ; Mon, 19 Nov 2018 05:16:58 -0500 (EST) Received: by mail-qk1-f198.google.com with SMTP id z126so67971803qka.10 for ; Mon, 19 Nov 2018 02:16:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=Nxtv3n9rUX3Umq56CPsblAVXzZrf0zdjcbISE72CVEo=; b=mwRM4KnVwUaCCfgdqeKiSxhSyS8vAPS1UOkQt2U6Ye+lZOyqBpAPzwcQXz8+ZOV9bz Ry3fHq+ENVyh9khBk8Rvh1X4c/Z+dfrf5bHe6PV9ZQ1e8ReUqbFOPCf6jBXgKKF1Jl6X vgDqlwYnG6VWcsIC2kNsY88GRQFiqY4Om5cSPhFx4xahY3NqeCRDq/wHCZQys6OQMKGZ 5kDuX9fab91gklxjl1fbHL53Ct+fxHhJAkeEpdSkAMAzzEtVxJL9vpGTgIdEN57MZL7V KPlUeEyulBVav8MUdAzDi6rNCf+4Iz9cVHpNcu7xctYOuR74ngKM0qmMbyKZcB6A/qDv EkTQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AGRZ1gILedwDY0knXVsmCHSucly1ZhjuMbYLcfwpSrLQWkn7IvwJXdg6 a2gXB7rA+10Jd3SWhRpaXy7oOCK9egBLDR+FPRI4QFM7iDsdBK0dfRQj9HRWWB461DQ70nmQiiz 48W+WMZPukRIN308fFVmxDUwYkhuT4edvDyAZo1niP7kj+kTILAS/fW8zYx8vry0o1w== X-Received: by 2002:aed:2185:: with SMTP id l5mr20704529qtc.276.1542622618502; Mon, 19 Nov 2018 02:16:58 -0800 (PST) X-Google-Smtp-Source: AJdET5eKLnXg6Fi4nkNthH32vpB48kgFVEc/zJCnYW3Komyk5v9trM/zqnfhtyh0riSmCFWHm9eg X-Received: by 2002:aed:2185:: with SMTP id l5mr20704488qtc.276.1542622617748; Mon, 19 Nov 2018 02:16:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542622617; cv=none; d=google.com; s=arc-20160816; b=eeDiY2/IbiFaR0oqmLvdA/u6meXtveE0qxz/ZwlmevspZ/UOOkiBCzZ1p80UridLYc 5zbB/f5BdAGUwjrmvABswiEj73qXyUtGv0sc2tUs3IWz5R5otlz9uazQJwalcizO5Nyn dbubX4z3AwOFXzH3kGaS251KgUh1g2qYKI3otELqt8EUOZyKeZjAL94UHmRw+d4lA3RV j28FFjK1Q9vh8exs8lqJ/6xKhE4GEFosDTY6brRXQJsIhpS2OvMy+o2d8ioGGVVsmXa9 K+Q1mR/ha3T61kksBqvtfazqnnYjy6PGlq+qSWyYSckb/5P2p3w7nmTDjiZO9GdP19oZ wPIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=Nxtv3n9rUX3Umq56CPsblAVXzZrf0zdjcbISE72CVEo=; b=K55L2tZwX2MeoOaIax9EOLY5j742BE5mRV9IqTvUsjkjlztNkiizsPPummFH92dfAL INSNGbO80Oqb85HHLfdiINb55NuKkKVh+0Tn6ifXcJEEFe569m4XVaR62pYQGwynj13V 5EH4xGU2cCqI8JhOYG37gVZv0S69p4feDm1btdb5zjharexstY1U2jHgShao8EK83fzE BikFCl18fFwmJnSEdsO1fQ+iC3hSkyHdFMMTNLgodgPFbSiklYYT2iEa/6etzZPIIHTk MMKD7xiGvDE2jKr9REnFZjqanqXdUbS0Ixo1XrmxIrYa+cwQPYNqxZG7cHmhVqU0Q9cy 9E4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id n14si4434063qvo.171.2018.11.19.02.16.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Nov 2018 02:16:57 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 mx1.redhat.com (Postfix) with ESMTPS id B088E3084243; Mon, 19 Nov 2018 10:16:56 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-77.ams2.redhat.com [10.36.117.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81DA3105706D; Mon, 19 Nov 2018 10:16:53 +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, kexec-ml , pv-drivers@vmware.com, David Hildenbrand , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Andrew Morton , Matthew Wilcox , Michal Hocko , "Michael S. Tsirkin" Subject: [PATCH v1 4/8] xen/balloon: mark inflated pages PG_offline Date: Mon, 19 Nov 2018 11:16:12 +0100 Message-Id: <20181119101616.8901-5-david@redhat.com> In-Reply-To: <20181119101616.8901-1-david@redhat.com> References: <20181119101616.8901-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 19 Nov 2018 10:16:57 +0000 (UTC) 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: X-Virus-Scanned: ClamAV using ClamSMTP 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);