From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: Balloon pressuring page cache Date: Wed, 5 Feb 2020 02:05:20 -0500 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <286AC319A985734F985F78AFA26841F73E41F10F@shsmsx102.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" To: "Wang, Wei W" Cc: "virtualization@lists.linux-foundation.org" , Tyler Sanderson , "linux-mm@kvack.org" , Nadav Amit , David Rientjes , Alexander Duyck , Michal Hocko List-Id: virtualization@lists.linuxfoundation.org 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. > > > > I meant that we must wait for host to see the hint. > > Why? > > 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. -- MST