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=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 260A2C35249 for ; Wed, 5 Feb 2020 07:05:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B72AA2085B for ; Wed, 5 Feb 2020 07:05:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bo0W3Uak" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B72AA2085B 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 517F36B000D; Wed, 5 Feb 2020 02:05:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A2756B000E; Wed, 5 Feb 2020 02:05:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36B096B0010; Wed, 5 Feb 2020 02:05:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0234.hostedemail.com [216.40.44.234]) by kanga.kvack.org (Postfix) with ESMTP id 1824C6B000D for ; Wed, 5 Feb 2020 02:05:29 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id CD909180AD806 for ; Wed, 5 Feb 2020 07:05:28 +0000 (UTC) X-FDA: 76455187536.24.shame80_2fccc359afc00 X-HE-Tag: shame80_2fccc359afc00 X-Filterd-Recvd-Size: 5385 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 5 Feb 2020 07:05:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580886327; 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=U/6qan3+z3NzH+0sfTzdKfYaPDRprH8XCr2JvMWcx+4=; b=bo0W3UakSAxq8vYLga08lLSDyMCD2+w8FZPZM2cTpAq7gTbQtnbHITv2SQanpzlQIUPzen Qx04m3BW5tAXln1FlhFN/5/uJ2u/yY86zrtUUn1KQ0t4T2kItKoF3Ts6IqluHQgWNIJkR5 pWHdnYgx4eJ6NcwhhU8wyXzThiyADFI= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-tnNBurH9O26LN4uiBs6hgA-1; Wed, 05 Feb 2020 02:05:26 -0500 Received: by mail-qt1-f197.google.com with SMTP id z11so764839qts.1 for ; Tue, 04 Feb 2020 23:05:25 -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=JHw6+/ySs4cWrJNj8bH+nVf35xXuNcS5JGraBBHTKWc=; b=OPq+KenDrqZ9pb3OIfvKIXY6c2nBYNHXSY8JiiLi1IlhQaC1fEs8ceFSq/0pMcISfI wU3pRyzNwyfqxQ/ttqcnQ1OGH8zIfZHAfECMeW0+TJC9PONImn3+d8ZisZ5qFsY7h70F ZOiJdeXwJZkRXL7MuTKoSJjlCuNiyUXx3d48kj87DS9L6Atxx5Tfe8EQwdBCRrcW1jvF IjJyU+Z7iH8I0qTNX9M02jrpcbno+kotMdAM+5XKX47ey2SWQwfsHW+yY/KBEDzCbRU5 HGmyDvuRQY45lgQAweq1vwX7MYKjHZqQx62FFJikN7LVZVBV1MFg8c/UDoYa+tPDQeg1 saLw== X-Gm-Message-State: APjAAAX1lEBYRVLFEjGtS5n7I3F2cZ5PUIGutt1IdG9fF3qid3VGrodu rnM8seW/9HQ0n+/vwjp96b+Utlg21U26ClZ8408qJzEGRqIV5jqVhYLdLT2Uyg8ZljcP1Nf0AW6 a1vnc/uTys9I= X-Received: by 2002:ac8:4c86:: with SMTP id j6mr31457768qtv.14.1580886325575; Tue, 04 Feb 2020 23:05:25 -0800 (PST) X-Google-Smtp-Source: APXvYqx7nGH0WZegXzQT7E7ZGLT5ts6hCXGlqzi9vJRGQU8h2EdNvicwY1bppj8zWwMPdUivgx1eyA== X-Received: by 2002:ac8:4c86:: with SMTP id j6mr31457751qtv.14.1580886325344; Tue, 04 Feb 2020 23:05:25 -0800 (PST) Received: from redhat.com (bzq-79-176-41-183.red.bezeqint.net. [79.176.41.183]) by smtp.gmail.com with ESMTPSA id 11sm12199283qko.76.2020.02.04.23.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 23:05:24 -0800 (PST) Date: Wed, 5 Feb 2020 02:05:20 -0500 From: "Michael S. Tsirkin" To: "Wang, Wei W" Cc: David Hildenbrand , Nadav Amit , Alexander Duyck , Tyler Sanderson , "virtualization@lists.linux-foundation.org" , David Rientjes , "linux-mm@kvack.org" , Michal Hocko Subject: Re: Balloon pressuring page cache Message-ID: <20200205015911-mutt-send-email-mst@kernel.org> References: <20200203080520-mutt-send-email-mst@kernel.org> <5ac131de8e3b7fc1fafd05a61feb5f6889aeb917.camel@linux.intel.com> <539B606A-A0CA-4AA4-B99A-759C874A1EF8@vmware.com> <20200204033657-mutt-send-email-mst@kernel.org> <20200204114336-mutt-send-email-mst@kernel.org> <286AC319A985734F985F78AFA26841F73E41F10F@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <286AC319A985734F985F78AFA26841F73E41F10F@shsmsx102.ccr.corp.intel.com> X-MC-Unique: tnNBurH9O26LN4uiBs6hgA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Wed, Feb 05, 2020 at 06:52:34AM +0000, Wang, Wei W wrote: > On Wednesday, February 5, 2020 12:50 AM, Michael S. Tsirkin wrote: > > > Michael, any clue on which event we have to wait with > > > VIRTIO_BALLOON_F_MUST_TELL_HOST? IMHO, I don't think > > > VIRTIO_BALLOON_F_MUST_TELL_HOST applies to > > > VIRTIO_BALLOON_F_FREE_PAGE_HINT and we'd better document that. It > > introduces complexity with no clear benefit. > >=20 > > I meant that we must wait for host to see the hint. >=20 > Why? >=20 > Best, > Wei Well if we did the hint would be reliable, allowing host to immediately drop any pages it gets in the hint. Originally I wanted to speed up hinting by never waiting for host, but that does not seem to be what was implemented: the only place we don't wait is the shrinker and it seems a waste that we introduced complexity to host without getting any real benefit out of it. VIRTIO_BALLOON_F_MUST_TELL_HOST doesn't really apply to hinting right now, so we could have used it to mean "hints must wait for host to use buffers". I'm afraid it's already a wasted opportunity at this point, reusing it isn't worth the compatibility headaches. --=20 MST