Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1307433ybv; Thu, 6 Feb 2020 01:37:51 -0800 (PST) X-Google-Smtp-Source: APXvYqx7gkcpJg+b0oYHqxZTobSHGfMXc9emWAfxEDfnMYXXwkAeWgt4c/P8cV+X5mznrOeV8qov X-Received: by 2002:a9d:4801:: with SMTP id c1mr30525430otf.258.1580981871428; Thu, 06 Feb 2020 01:37:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580981871; cv=none; d=google.com; s=arc-20160816; b=BFyZ9qOEEfhDAJ3eMYq4WHamAPiaZFNgrLbsST1aNIO88qmRLsSU/jVO0fNeAIh7P7 YgW1kGxXoVz3BAKnDM2DEhlE/R44UPwwe1Squ1kX5cQcwY9jjI6QEHvaEG3DhWCEqruh U2Mg5nFmg1qV92tc0hr0KG2CoS3iWRyQjt+stGARLnsHusSZv/5UGub/v4EhI3ePPrP1 Ne12Hsh2VVE3nzKo1RoHZAPDZBCv277rnoHtDYA0Oyr0Q0BUkGE88duKJDYcVC2cyJC+ 5X1YkMNQABrHuphgDnIG7IW5pYPlftARmcBGkii7SFRv7A6zcII0/lZVdgH327Eos2Jn VvUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=A1LG9DblC2cTdhxgTIVXCEtFlpZae6akT23NYT3sY/o=; b=bC98N1Pwv94EumRDJ1nuiFeJtpSBG8SIz/p+1cJFGC4QpSVGaqoftAqwGN6J/T/lGh O347O0jG2Fc+v+y025DPeuKDMR4l57oOIonGmuIIziU47lO2aX7JONDF44chr1ZVU8OI TPMuynzXHURvkFdGwTJo9bHnbf2BlDKLmDJl/XgE/EnHPHZ1syArG3CDdWqFeterxtZU 6Cx7ZVnNGSAQYZvKLwuwJUkgSZi+YZ82CIh3rLhXNBN+oU7N3khHSv7OxRhwjUBuiNhR yW1hMaPI28sE8qNz6eDyKPJ1p0IAi5KFnVBggO850pqbfGaz7EMFOJWl70he6mLFvPcY 534A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BB75OWtB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6si1543630ota.322.2020.02.06.01.37.39; Thu, 06 Feb 2020 01:37:51 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BB75OWtB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728261AbgBFJJr (ORCPT + 99 others); Thu, 6 Feb 2020 04:09:47 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:29071 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726452AbgBFJJq (ORCPT ); Thu, 6 Feb 2020 04:09:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580980185; 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: in-reply-to:in-reply-to:references:references; bh=A1LG9DblC2cTdhxgTIVXCEtFlpZae6akT23NYT3sY/o=; b=BB75OWtBDQSJ3x2VHUOK6ysM+fPp5SMXsyTb5MR5CMfu5jNRXHNRp0D/EoGwkIE8I5VNKK sqppzFfnK43nU1lY8OUNyn6ZVQYds/J+yCy6C+ag1WEkvksOyHQCv/WOCoxyWQmT7o5rdH ctrT/ByhmWyH0AABFvboLR2ksEpUV+A= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-88-4I8cYXz4M0K8Hxy9lF4N4A-1; Thu, 06 Feb 2020 04:09:44 -0500 X-MC-Unique: 4I8cYXz4M0K8Hxy9lF4N4A-1 Received: by mail-qk1-f198.google.com with SMTP id a23so250958qkl.7 for ; Thu, 06 Feb 2020 01:09:44 -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=A1LG9DblC2cTdhxgTIVXCEtFlpZae6akT23NYT3sY/o=; b=uDVdWcHdE2hvWMrqm4ykRvUClnmxPyCtJNyy9/MPaM5HLpL7HtDFOnNvYDy6ATtXKm ncWvDAWa8Qo0N7Lm6yrs7fZ82EPtM4CPmKIG4miGoWajP1QZY5X4Zx8JXmZxvSi8QJjo ckjzvB9nX/zzXfaLAAZBP1svo4EYTu0PUFJa2Lh/mbPXKcNl+PvGY/Fb+cXDOjtBaOUC vwmg3pw4GIp/6+v9JcleRIcidaD4rpBLYmEBsPSHig4Bzta/bCJJG9gWue+ngralPOic H5ILstFk4D4DYyzd9Xokcmc4xVxuSXjlQL8NNhznUt+jvE/lcAm5tbrIMKrXARuOBtFV 7q/g== X-Gm-Message-State: APjAAAVPniUeM6S/6Jpqx2yuSEol8rYT/fyHDYqeXpdiGYc+bUuDJMJb TcJxIr2GtchZq0gd0OEyJjd/jXED1e8nR8GklE3WpsdV4KDi0zoxWidh7Y2BOhglh3XpHB9xhW2 SS0f83UuyEL4u4fQuvcVT7CWI X-Received: by 2002:a05:620a:ced:: with SMTP id c13mr1563611qkj.47.1580980183669; Thu, 06 Feb 2020 01:09:43 -0800 (PST) X-Received: by 2002:a05:620a:ced:: with SMTP id c13mr1563598qkj.47.1580980183446; Thu, 06 Feb 2020 01:09:43 -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 y27sm1418057qta.50.2020.02.06.01.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 01:09:42 -0800 (PST) Date: Thu, 6 Feb 2020 04:09:38 -0500 From: "Michael S. Tsirkin" To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, virtualization@lists.linux-foundation.org, Tyler Sanderson , Wei Wang , Alexander Duyck , David Rientjes , Nadav Amit , Michal Hocko Subject: Re: [PATCH v1 3/3] virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM Message-ID: <20200206040927-mutt-send-email-mst@kernel.org> References: <20200205163402.42627-1-david@redhat.com> <20200205163402.42627-4-david@redhat.com> <20200206013724-mutt-send-email-mst@kernel.org> <51955928-5a4b-c922-ee34-6e94b6cdd385@redhat.com> <20200206034916-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 06, 2020 at 10:05:43AM +0100, David Hildenbrand wrote: > >> commit bf50e69f63d21091e525185c3ae761412be0ba72 > >> Author: Dave Hansen > >> Date: Thu Apr 7 10:43:25 2011 -0700 > >> > >> virtio balloon: kill tell-host-first logic > >> > >> The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST > >> feature bit. Whenever the bit is set, the guest kernel must > >> always tell the host before we free pages back to the allocator. > >> Without this feature, we might free a page (and have another > >> user touch it) while the hypervisor is unprepared for it. > >> > >> But, if the bit is _not_ set, we are under no obligation to > >> reverse the order; we're under no obligation to do _anything_. > >> As of now, qemu-kvm defines the bit, but doesn't set it. > > > > Well this is not what the spec says in the end. > > I didn't check the spec, maybe I should do that :) > > > To continue that commit message: > > > > This patch makes the "tell host first" logic the only case. This > > should make everybody happy, and reduce the amount of untested or > > untestable code in the kernel. > > Yeah, but this comment explains that the current deflate is only in > place, because it makes the code simpler (to support both cases). Of > course, doing the deflate might result in performance improvements. > (e.g., MADV_WILLNEED) > > > > > you can try proposing the change to the virtio TC, see what do others > > think. > > We can just drop the comment from this patch for now. The tell_host host > not be an issue AFAIKS. I guess it's a good idea. > -- > Thanks, > > David / dhildenb