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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 D6907C2D0B1 for ; Thu, 6 Feb 2020 09:09:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8AEB3206CC for ; Thu, 6 Feb 2020 09:09:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TkTVIQUv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8AEB3206CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 368DD6B0003; Thu, 6 Feb 2020 04:09:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 319806B0006; Thu, 6 Feb 2020 04:09:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 208FA6B0007; Thu, 6 Feb 2020 04:09:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id 05A1B6B0003 for ; Thu, 6 Feb 2020 04:09:47 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9250B8248D52 for ; Thu, 6 Feb 2020 09:09:46 +0000 (UTC) X-FDA: 76459129572.08.brush47_1b163fa2ecb49 X-HE-Tag: brush47_1b163fa2ecb49 X-Filterd-Recvd-Size: 5678 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Thu, 6 Feb 2020 09:09:45 +0000 (UTC) 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EL0wfUsEbs+HLvvIq1wWAF1or9L5DP3gkBEOgFi14gc=; b=TkTVIQUvNa8HNF6KHO8BAk2ebUcD/O39nU25M8MKrGObGcj4tncDrvk/E0zRPF6IQ6Co2Z 2zolV9WK3+UQNhA9IHRkvJlobSGYxF0S4vUmn3z9d7ecG32ckn7hwMXnfSiVDN62no7S/E b8PGlOpWsfSbzn81Ia6IBESkZHWgty8= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-88-gksZ8F1RMW2TzO7S0FD0PQ-1; Thu, 06 Feb 2020 04:09:44 -0500 Received: by mail-qk1-f197.google.com with SMTP id 12so3133247qkf.20 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=eFoEu3boZjJ4PjnIlgM4y67mQCR9oE0+TzpLPjG6GnjZA+tGQHtd+wjJlly9ES+qqL nzhFon8gGMZhaDejIa8nZP7Z2qhvRSsJXF7W2wi9GIM2xEg+kCAAKxe132D7gZmGM0Fy 04opIwQXojROFGYfzTnAEzYkaWG+Co9jzgjOhZugjdnxvpxtoZRUjDa56q5CeQlcxJh+ jFqhfF7PhDCT4f98syWKI5Lte40grAL5gb+zBIDUPkBrKDiVmb8RLMOfJCo+Uk3yi+0h 0/dcYUlDMdatkUH7LdvNqI4dCZUe1+i9H3+bOwJ+GUDXCegshflJxCk5rxB1uc+jB8Uf dFMw== X-Gm-Message-State: APjAAAXf7aSwpnRyWG3Pgh/a0g4ug76jQlzRzFq0bFdS1lh3UcSOX9hR s0jareEMXdQ793cZwiXN198yJ3fixut7LSvw2xb2Kd/MwNjRanpgVKpG4Ilw/GoAPVusfu6HmOS FPpKLhX9hZFg= X-Received: by 2002:a05:620a:ced:: with SMTP id c13mr1563616qkj.47.1580980183670; Thu, 06 Feb 2020 01:09:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyfMTZ5Cg+M33ciqGE043zi3UGdLoIZDBLsziU6lg7yBA1llshc6iEL8HwIf8KHgdth7yTgAA== 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 In-Reply-To: X-MC-Unique: gksZ8F1RMW2TzO7S0FD0PQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. > >=20 > > Well this is not what the spec says in the end. >=20 > I didn't check the spec, maybe I should do that :) >=20 > > To continue that commit message: > >=20 > > 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. >=20 > 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) >=20 > >=20 > > you can try proposing the change to the virtio TC, see what do others > > think. >=20 > 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. > --=20 > Thanks, >=20 > David / dhildenb