From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CDF8C388F3 for ; Tue, 1 Oct 2019 09:02:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5000221920 for ; Tue, 1 Oct 2019 09:02:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5000221920 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 013CF8E0008; Tue, 1 Oct 2019 05:02:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F088B8E0001; Tue, 1 Oct 2019 05:02:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1D5A8E0008; Tue, 1 Oct 2019 05:02:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id BC7778E0001 for ; Tue, 1 Oct 2019 05:02:06 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 60B6A181AC9AE for ; Tue, 1 Oct 2019 09:02:06 +0000 (UTC) X-FDA: 75994623852.27.story68_4c8b271e5c813 X-HE-Tag: story68_4c8b271e5c813 X-Filterd-Recvd-Size: 2886 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Oct 2019 09:02:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0702373A62; Tue, 1 Oct 2019 09:02:05 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-182.ams2.redhat.com [10.36.117.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 824F0611DE; Tue, 1 Oct 2019 09:02:01 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, xen-devel@lists.xenproject.org, David Hildenbrand , Boris Ostrovsky , Juergen Gross , Stefano Stabellini Subject: [PATCH v1 3/3] xen/balloon: Clear PG_offline in balloon_retrieve() Date: Tue, 1 Oct 2019 11:01:52 +0200 Message-Id: <20191001090152.1770-4-david@redhat.com> In-Reply-To: <20191001090152.1770-1-david@redhat.com> References: <20191001090152.1770-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 01 Oct 2019 09:02:05 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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: Let's move the clearing to balloon_retrieve(). In bp_state increase_reservation(), we now clear the flag a little earlier than before, however, this should not matter for XEN. Suggested-by: Boris Ostrovsky Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Signed-off-by: David Hildenbrand --- drivers/xen/balloon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 8c245e99bb06..5bae515c8e25 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -189,6 +189,7 @@ static struct page *balloon_retrieve(bool require_low= mem) else balloon_stats.balloon_low--; =20 + __ClearPageOffline(page); return page; } =20 @@ -440,7 +441,6 @@ static enum bp_state increase_reservation(unsigned lo= ng nr_pages) xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); =20 /* Relinquish the page back to the allocator. */ - __ClearPageOffline(page); free_reserved_page(page); } =20 @@ -606,7 +606,6 @@ int alloc_xenballooned_pages(int nr_pages, struct pag= e **pages) while (pgno < nr_pages) { page =3D balloon_retrieve(true); if (page) { - __ClearPageOffline(page); pages[pgno++] =3D page; #ifdef CONFIG_XEN_HAVE_PVMMU /* --=20 2.21.0