Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp465762ybv; Wed, 5 Feb 2020 08:36:27 -0800 (PST) X-Google-Smtp-Source: APXvYqykmDKjQiDMeTikrEzZYVS6rJwQ7pauyrA9yMFY+SjgGdzap7dGOaDWnZqxe7PQ66keGrbX X-Received: by 2002:a9d:7696:: with SMTP id j22mr27904289otl.188.1580920587774; Wed, 05 Feb 2020 08:36:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580920587; cv=none; d=google.com; s=arc-20160816; b=uzJ02PLQFqgcX5dp6zOghl2bP95xHAot0ihrBaOILH87tIGK5TErLC6Mi+zNGAgGgu Kf2c4uXgEVBXEuC8EhCzyEbxPWzwgczm5EgB9JjO09Ilrd3opkwf4YY1kCdDtcSGGGlF Ifw95yhJNvjn7RIzkHiLPuiBh+N7qQ+8wo50nWS/Y97EVaNocC8QteKX0rqEM9G57tTF 2UZTRq0qtfoGlmcDkZD8neY0TxoogXFrnJLILvqxcGLZo5k7Tl2nHjD3d9HoUW9MP7Ll g599WhoVFB9PH/F2E6Py6j3wLBI+XqUX/p8Egfe6d26vHrpHSTRCZXATnsKHcJ6rMPCj MFyg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rexFf3u9dwOgKF8qwa6CKc29pRBkdXMGcoOgim7g7N4=; b=Ltn46e58vT7QOMupRtL9mXulons8sG4shg3X4rYvFbWqbTLwEnUo4JmfOJzuyD3LBE W2otgxyyyPGiuhTh+9ZNcoh0zcB1MOe5FjZpgeS6UvDu9bWfi7ai1Sa9kf7HN2Ef2jGm fozzT4nfVMU6wcT0jqr1KkyttrC0fjwOc4CEJn2EuvB+JLsV0vIascu9cnxEeYI9r33e /t3mw75rkH4y1BxniUJCAHMKphftBH/vbkV4yhQdVVFkyUiF/1jm85BQLbdDawY9dyuJ KR0nhP1AAEU30IT6pvZNDgP0MalBPUp0Q4yrGq5pcnJCNGiSD+UsYdMJUed2J1yBBWkO NjSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TE5qbyxx; 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 d19si14613985ote.3.2020.02.05.08.36.15; Wed, 05 Feb 2020 08:36:27 -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=TE5qbyxx; 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 S1727472AbgBEQeg (ORCPT + 99 others); Wed, 5 Feb 2020 11:34:36 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:46159 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726359AbgBEQef (ORCPT ); Wed, 5 Feb 2020 11:34:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580920474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=rexFf3u9dwOgKF8qwa6CKc29pRBkdXMGcoOgim7g7N4=; b=TE5qbyxxU+s4K2sR75Ci1TtW8PcT1NI2MJ1jlTJJt83M++wECgsDRazU//Bgsk6Dvx6Xe1 vyYEN3+lkL2oFb2JvRGRCWYWtTkHGTETbz5PeXG0iMuy9frQ91CpdDxOh6kccvebvMDdQ7 MKhJV/W5z5sdobX3sUVC/jiNwP5gCgs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-53-ei-AHbADN5qyeyeQL7fMRw-1; Wed, 05 Feb 2020 11:34:13 -0500 X-MC-Unique: ei-AHbADN5qyeyeQL7fMRw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 64CD4190D37B; Wed, 5 Feb 2020 16:34:11 +0000 (UTC) Received: from t480s.redhat.com (ovpn-116-217.ams2.redhat.com [10.36.116.217]) by smtp.corp.redhat.com (Postfix) with ESMTP id F28231001B05; Wed, 5 Feb 2020 16:34:02 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, virtualization@lists.linux-foundation.org, David Hildenbrand , Alexander Duyck , David Rientjes , Jason Wang , Liang Li , "Michael S. Tsirkin" , Michal Hocko , Nadav Amit , Tyler Sanderson , Wei Wang Subject: [PATCH v1 0/3] virtio-balloon: Fixes + switch back to OOM handler Date: Wed, 5 Feb 2020 17:33:59 +0100 Message-Id: <20200205163402.42627-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Two fixes for issues I stumbled over while working on patch #3. Switch back to the good ol' OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_O= OM as the switch to the shrinker introduce some undesired side effects. Keep the shrinker in place to handle VIRTIO_BALLOON_F_FREE_PAGE_HINT. Lengthy discussion under [1]. I tested with QEMU and "deflate-on-oom=3Don". Works as expected. Did not test the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT, as it is hard to trigger (only when migrating a VM, and even then, it might not trigger). [1] https://www.spinics.net/lists/linux-virtualization/msg40863.html David Hildenbrand (3): virtio-balloon: Fix memory leak when unloading while hinting is in progress virtio_balloon: Fix memory leaks on errors in virtballoon_probe() virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM drivers/virtio/virtio_balloon.c | 124 +++++++++++++++----------------- 1 file changed, 57 insertions(+), 67 deletions(-) --=20 2.24.1