Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11264711ybi; Thu, 25 Jul 2019 13:01:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEf10fM74x1lwef8bWQu2Z36STKe+A0nFiIZgdtgo9rUOOoe06bbuAqAn4/t8bvm93IGX7 X-Received: by 2002:a63:c118:: with SMTP id w24mr85863972pgf.347.1564084861481; Thu, 25 Jul 2019 13:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564084861; cv=none; d=google.com; s=arc-20160816; b=KNZb0NKBgN2CIj6py1av/YtdNUJpQUj/+dxML/ug4mYSHDkexTdIHBqU2iurb+MJ9U nwzJsKMGJ//tXFOPyGJM4TaROpt38K3wPFo6kAazO38B000bLz0WGLaHysAg1PE4Yaus Y6ls6Zdx3sRrLRNWHnKDzGjZ0iYDDY6KwAb/8We8KL3pPb5TxYH29eSP2HAgYC1cJrmG SoQKeYc2b2Y1NHlnLbCwCTqGnJk6XP02j0JaydrfBDYLN2pA1oBvw2Ss+HES5le7DrBZ R+MHajFnVXO9SbLbIX1zjbCxkAG3dfYcSa+alw+ZIqQROMPXulKQvd9xtRTxiX1vlJqi 8fiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=5FiYrm9No595AgyPC1IYR9NTuGQ4xA95R4m5fC/yjic=; b=kGtguqN2F1m1JbgtQ6nikw5nagi+Wl3gikzDk8n5dfJ1tTeTYa+zFFRx+1K0IBslxJ XuGU1SUJjeqTx/yt+9XG/7jQoyKfcfXO+epx9BXv03Co4NCnCsF6kkenodeBS4Jl0YWS ZHgnd4PjqwiUVKTtC1bBCKDePLooG/TeDXBrBRCZs/BG0CFiOQluvJoDlITT8pWB0xLV RpPS2DxD8umcVpWWD9RhgdJQl9uGJ2Ym5zdByAcVjyt3VW1t6MNQzj5uf5qQUMPsoD4A MsOBFnO6lLg402fxeFGtZbh2TKTDSLcaTzb1oD33NR7B8xN6Tx0eSmtrt3Z1Y2QhmbJB bttA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si16668009plp.404.2019.07.25.13.00.46; Thu, 25 Jul 2019 13:01:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726422AbfGYUAI (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.