From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: On guest free page hinting and OOM Date: Tue, 2 Apr 2019 11:25:10 -0400 Message-ID: <20190402112115-mutt-send-email-mst@kernel.org> References: <20190329125034-mutt-send-email-mst@kernel.org> <20190401073007-mutt-send-email-mst@kernel.org> <29e11829-c9ac-a21b-b2f1-ed833e4ca449@redhat.com> <20190401104608-mutt-send-email-mst@kernel.org> <6a612adf-e9c3-6aff-3285-2e2d02c8b80d@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: David Hildenbrand , Nitesh Narayan Lal , kvm list , LKML , linux-mm , Paolo Bonzini , lcapitulino@redhat.com, pagupta@redhat.com, wei.w.wang@intel.com, Yang Zhang , Rik van Riel , dodgen@google.com, Konrad Rzeszutek Wilk , dhildenb@redhat.com, Andrea Arcangeli To: Alexander Duyck Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Apr 02, 2019 at 08:04:00AM -0700, Alexander Duyck wrote: > Basically what we would be doing is providing a means for > incrementally transitioning the buddy memory into the idle/offline > state to reduce guest memory overhead. It would require one function > that would walk the free page lists and pluck out pages that don't > have the "Offline" page type set, I think we will need an interface that gets an offline page and returns the next online free page. If we restart the list walk each time we can't guarantee progress. > a one-line change to the logic for > allocating a page as we would need to clear that extra bit of state, > and optionally some bits for how to handle the merge of two "Offline" > pages in the buddy allocator (required for lower order support). It > solves most of the guest side issues with the free page hinting in > that trying to do it via the arch_free_page path is problematic at > best since it was designed for a synchronous setup, not an > asynchronous one. -- MST