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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 687C0C76194 for ; Thu, 25 Jul 2019 20:00:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C5BA229F3 for ; Thu, 25 Jul 2019 20:00:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726366AbfGYUAI (ORCPT ); Thu, 25 Jul 2019 16:00:08 -0400 Received: from mga14.intel.com ([192.55.52.115]:2147 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbfGYUAI (ORCPT ); Thu, 25 Jul 2019 16:00:08 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 13:00:07 -0700 X-IronPort-AV: E=Sophos;i="5.64,307,1559545200"; d="scan'208";a="254074357" Received: from ahduyck-desk1.jf.intel.com ([10.7.198.76]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 13:00:07 -0700 Message-ID: <6bee80b95885e74a5e46e3bd3e708d092b4a666f.camel@linux.intel.com> Subject: Re: [PATCH v2 QEMU] virtio-balloon: Provide a interface for "bubble hinting" From: Alexander Duyck To: Nitesh Narayan Lal , "Michael S. Tsirkin" Cc: Alexander Duyck , kvm@vger.kernel.org, david@redhat.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, yang.zhang.wz@gmail.com, pagupta@redhat.com, riel@surriel.com, konrad.wilk@oracle.com, lcapitulino@redhat.com, wei.w.wang@intel.com, aarcange@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com Date: Thu, 25 Jul 2019 13:00:07 -0700 In-Reply-To: References: <20190724165158.6685.87228.stgit@localhost.localdomain> <20190724171050.7888.62199.stgit@localhost.localdomain> <20190724173403-mutt-send-email-mst@kernel.org> <20190725111303-mutt-send-email-mst@kernel.org> <96b1ac42dccbfbb5dd17210e6767ca2544558390.camel@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, 2019-07-25 at 14:25 -0400, Nitesh Narayan Lal wrote: > On 7/25/19 12:16 PM, Alexander Duyck wrote: > > On Thu, 2019-07-25 at 11:16 -0400, Michael S. Tsirkin wrote: > > > On Thu, Jul 25, 2019 at 08:05:30AM -0700, Alexander Duyck wrote: > > > > On Thu, 2019-07-25 at 07:35 -0400, Nitesh Narayan Lal wrote: > > > > > On 7/24/19 6:03 PM, Alexander Duyck wrote: > > > > > > On Wed, 2019-07-24 at 17:38 -0400, Michael S. Tsirkin wrote: > > > > > > > On Wed, Jul 24, 2019 at 10:12:10AM -0700, Alexander Duyck wrote: > > > > > > > > From: Alexander Duyck > > > > > > > > > > > > > > > > > Ideally we should be able > > to provide the hints and have them feed whatever is supposed to be using > > them. So for example I could probably look at also clearing the bitmaps > > when migration is in process. > > > > Also, I am wonder if the free page hints would be redundant with the form > > of page hinting/reporting that I have since we should be migrating a much > > smaller footprint anyway if the pages have been madvised away before we > > even start the migration. > > > > > FWIW Nitesh's RFC does not have this limitation. > > Yes, but there are also limitations to his approach. For example the fact > > that the bitmap it maintains is back to being a hint rather then being > > very exact. > > True. > > > > As a result you could end up walking the bitmap for a while > > clearing bits without ever finding a free page. > > Are referring to the overhead which will be introduced due to bitmap scanning on > very large guests? Yes. One concern I have had is that for large memory footprints the RFC would end up having a large number of false positives on an highly active system. I am worried it will result in a feedback loop where having more false hits slows down your processing speed, and the slower your processing speed the more likely you are to encounter more false hits.