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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 E280FC43603 for ; Sun, 15 Dec 2019 09:29:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7753821D7E for ; Sun, 15 Dec 2019 09:29:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AO7ruZ39" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7753821D7E 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 D7B9B8E0005; Sun, 15 Dec 2019 04:29:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D2DA68E0003; Sun, 15 Dec 2019 04:29:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF4B58E0005; Sun, 15 Dec 2019 04:29:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0121.hostedemail.com [216.40.44.121]) by kanga.kvack.org (Postfix) with ESMTP id A9C988E0003 for ; Sun, 15 Dec 2019 04:29:35 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5091E180AD807 for ; Sun, 15 Dec 2019 09:29:35 +0000 (UTC) X-FDA: 76266853110.01.clock63_194cfedb69859 X-HE-Tag: clock63_194cfedb69859 X-Filterd-Recvd-Size: 8167 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Sun, 15 Dec 2019 09:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576402172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ilj2z4xRGvRdJt0vrDQ9UKGkwQNXfv5KJ/5+DOPrUa8=; b=AO7ruZ39lbEi5SD99XBYPdydcxs7cfMaUCsOHsBRb1tdFra/Gx6cEg65ZMCy+GBe+8OyF/ oM1Ao/yyqqRUd0bVVrcQdcSyJQFbgb2TFeYz9AqrdHFnZf5XeXNpbl1ByV7pFzefxzali1 PuGR2Gqw5i8wSjGb74ueEiL8SjYjCKY= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-368-UJSqvclJNe6n3XuDBuAM5g-1; Sun, 15 Dec 2019 04:29:31 -0500 Received: by mail-wr1-f70.google.com with SMTP id u18so2010579wrn.11 for ; Sun, 15 Dec 2019 01:29:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/cbRoYQjVF9Fb6jVOjdPPWTnHMqlJsBUDXZ6cVmV9Xc=; b=uaTVYwCPIYkZ0tR8C68PiNRjIXfEZ+fVfvgVjH7JdHFquYgz74C2zmgmI8Shq8YHLo iXIywOrhf0jRA4x1anI+/1jrXrAcMpF6hmTK2y1Z04J8ImkIJ1XhEZEWI7DdYEx3ExnF S8HDu0pC0BmF5SvW6Z6zv/Xjploq9eg+3/baqJ9chQ5Cbnayd+Gt8KfCaW4LkQOim6L9 vLNj1WqoPpoysT/z1ndrBs/VgCE222PPRg5Y0NhbmIjkkxKuew7zQ1f1kJG4qMukS/5I 5KkSq2WjJRTG52IxN42/qO4G86feph5T/4C8L57uFWKZ09Nw2MW59mnIAnw0P0hArODM mAbg== X-Gm-Message-State: APjAAAWsrh6T1cQ92XV/nqHWG7ariitnJCQ4LMv8FaFcFEp3QN9lHYwg CYnYgouZGQ4X8cRMuykkYWZOo2zJvPn/CdOnx13pqRquLTOZcern1BgntyZIlcQT+r4HnkqjOpS YjMNsN7Pq5AU= X-Received: by 2002:adf:f508:: with SMTP id q8mr23869168wro.334.1576402170098; Sun, 15 Dec 2019 01:29:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxSQuoeSXK2JQ2a3NYGSOG+IKU4rIEY4e8d8n4cgPva88Rr6fI9uU2IyMvMty0zVO7CDBdDhQ== X-Received: by 2002:adf:f508:: with SMTP id q8mr23869104wro.334.1576402169688; Sun, 15 Dec 2019 01:29:29 -0800 (PST) Received: from redhat.com (bzq-79-181-48-215.red.bezeqint.net. [79.181.48.215]) by smtp.gmail.com with ESMTPSA id p17sm17373292wmk.30.2019.12.15.01.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Dec 2019 01:29:28 -0800 (PST) Date: Sun, 15 Dec 2019 04:29:25 -0500 From: "Michael S. Tsirkin" To: Alexander Duyck Cc: Alexander Duyck , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org, mhocko@kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, mgorman@techsingularity.net, vbabka@suse.cz, yang.zhang.wz@gmail.com, nitesh@redhat.com, konrad.wilk@oracle.com, david@redhat.com, pagupta@redhat.com, riel@surriel.com, lcapitulino@redhat.com, dave.hansen@intel.com, wei.w.wang@intel.com, aarcange@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, osalvador@suse.de Subject: Re: [PATCH v15 6/7] virtio-balloon: Add support for providing free page reports to host Message-ID: <20191215042538-mutt-send-email-mst@kernel.org> References: <20191205161928.19548.41654.stgit@localhost.localdomain> <20191205162255.19548.63866.stgit@localhost.localdomain> <20191213020553-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 In-Reply-To: X-MC-Unique: UJSqvclJNe6n3XuDBuAM5g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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: On Fri, Dec 13, 2019 at 08:35:13AM -0800, Alexander Duyck wrote: > On Fri, 2019-12-13 at 02:08 -0500, Michael S. Tsirkin wrote: > > On Thu, Dec 05, 2019 at 08:22:55AM -0800, Alexander Duyck wrote: > > > From: Alexander Duyck > > >=20 > > > Add support for the page reporting feature provided by virtio-balloon= . > > > Reporting differs from the regular balloon functionality in that is i= s > > > much less durable than a standard memory balloon. Instead of creating= a > > > list of pages that cannot be accessed the pages are only inaccessible > > > while they are being indicated to the virtio interface. Once the > > > interface has acknowledged them they are placed back into their respe= ctive > > > free lists and are once again accessible by the guest system. > > >=20 > > > Unlike a standard balloon we don't inflate and deflate the pages. Ins= tead > > > we perform the reporting, and once the reporting is completed it is > > > assumed that the page has been dropped from the guest and will be fau= lted > > > back in the next time the page is accessed. > > >=20 > > > For this reason when I had originally introduced the patch set I refe= rred > > > to this behavior as a "bubble" instead of a "balloon" since the durat= ion > > > is short lived, and when the page is touched the "bubble" is popped a= nd > > > the page is faulted back in. > > >=20 > > > Signed-off-by: Alexander Duyck > >=20 > > virtio POV is fine here: > >=20 > > Acked-by: Michael S. Tsirkin > >=20 > > However please copy virtio-comment on UAPI changes. >=20 > So I have been avoiding copying virtio-dev on the kernel changes as I had > gotten feedback that it was annoying some people as they were getting > bounces since they were not subscribed. Will the same type of thing happe= n > with virtio-comment? Same thing. > > If possible isolate the last chunk in a patch by itself > > to make it easier for non-kernel developers to review. >=20 > Are you talking about the change in "include/uapi/linux/virtio_balloon.h"= ? >=20 > I have it as a standalone patch in the QEMU set, and for the QEMU set I > had included virtio-dev. That's enough then. > Would you prefer I include virtio-comment instead > or in addition to virtio-dev? My thought is that I would prefer to keep > the virtio people focused on the QEMU code since they are probably more > comfortable with that, and the kernel people focused on the kernel code. virtio-dev is enough too. > > > --- > > > drivers/virtio/Kconfig | 1 + > > > drivers/virtio/virtio_balloon.c | 64 +++++++++++++++++++++++++= ++++++++++ > > > include/uapi/linux/virtio_balloon.h | 1 + > > > 3 files changed, 66 insertions(+) >=20 > >=20 > > >=20 > > > diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux= /virtio_balloon.h > > > index a1966cd7b677..19974392d324 100644 > > > --- a/include/uapi/linux/virtio_balloon.h > > > +++ b/include/uapi/linux/virtio_balloon.h > > > @@ -36,6 +36,7 @@ > > > #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM=092 /* Deflate balloon on OO= M */ > > > #define VIRTIO_BALLOON_F_FREE_PAGE_HINT=093 /* VQ to report free pag= es */ > > > #define VIRTIO_BALLOON_F_PAGE_POISON=094 /* Guest is using page pois= oning */ > > > +#define VIRTIO_BALLOON_F_REPORTING=095 /* Page reporting virtqueue *= / > > > =20 > > > /* Size of a PFN in the balloon interface. */ > > > #define VIRTIO_BALLOON_PFN_SHIFT 12 >=20 > If this is the bit we are talking about I have it split out already into = a > QEMU specific patch as well, it can be found here: > https://lore.kernel.org/lkml/20191205162422.19737.57728.stgit@localhost.l= ocaldomain/ >=20 > If needed I could probably add a cover page and/or update the comments in > that patch if that is needed to better explain the change. >=20 > Thanks. >=20 > - Alex Updating comment in this patch can't hurt. But yes, this is OK as is, too, I just missed that you did it. --=20 MST