Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp751964ybi; Wed, 17 Jul 2019 04:22:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQWL/ToXWzLvEozf07Hqzf4ztZViLKWLAoJ0kxV8O4p7xsY3s7jzn61uPAkzFnLhzmiv9F X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr43169763plz.38.1563362528065; Wed, 17 Jul 2019 04:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563362528; cv=none; d=google.com; s=arc-20160816; b=sAPI55ihgr9jrWR3LBIRrPA0/1JsOhwPf4Db7NUNi6G+PnWB9JNWhvYMVY5+EHSew8 /R8NydkOkFMfuNo5jyIlyhO5DE3IXML/Dlz4aAhw1aHFqM6VUXq+T1ojx9G0oIkFOutn 2udzvJFIDsA56T5uxsR5nsXjbk4OqhiMhBs4EVld6wOsYpls0lpM765mc81m1iZ5F7ux 8XA+234Yb0w1Jq80iTkhvJgpuS/VSgD2urW7h9PIa2eaEvHr6Genvfg4Mg16io++rqdH m0eUkERnEEXRqe8AOpQSInFjTIosXNiHLEVXdLf59EWcxDNuVucjLI/bAawy01j4XNDQ hM7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=VE3YIGYcV3g+ik7exL22WJT4Jq3zzmYu4pf0aT2qjHM=; b=DsFP6IX4m/edQErkb+4PvW0gQATKW7/U5KuHBAHXBCy91atzBxBk6xTV2ksqdEvSe/ +v0RoMAEjSWSbGIwCQiV4N2I+KLGLZ795ahaj02W4PDzVEZF0ssy/9Vpc8gD9rjK7TId thksrS8+DpC4FRM97bEB5X1hYnluX98O37/63NdAdOeKacu3iMbNxUV4jTCtwgkfoWdP kwbPhp0RBsv0tXoH8DZv/Jg8fFERtLeUZ//r6F7MndzeRuTjE+FuUekL776T8KUzaUDe R6ELlCjxqyszlXS2mQzjcov0Pamyuj2Eto5fxbZYRt2/1A5nxcnH3RD3EBAH1Q74WHkx XG8A== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si23783197pgh.186.2019.07.17.04.21.51; Wed, 17 Jul 2019 04:22:08 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726824AbfGQLU4 (ORCPT + 99 others); Wed, 17 Jul 2019 07:20:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54500 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbfGQLUz (ORCPT ); Wed, 17 Jul 2019 07:20:55 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5B1D33082133; Wed, 17 Jul 2019 11:20:55 +0000 (UTC) Received: from redhat.com (ovpn-120-247.rdu2.redhat.com [10.10.120.247]) by smtp.corp.redhat.com (Postfix) with SMTP id EB7D55C232; Wed, 17 Jul 2019 11:20:34 +0000 (UTC) Date: Wed, 17 Jul 2019 07:20:33 -0400 From: "Michael S. Tsirkin" To: Alexander Duyck Cc: wei.w.wang@intel.com, Nitesh Narayan Lal , kvm list , David Hildenbrand , Dave Hansen , LKML , linux-mm , Andrew Morton , Yang Zhang , pagupta@redhat.com, Rik van Riel , Konrad Rzeszutek Wilk , lcapitulino@redhat.com, Andrea Arcangeli , Paolo Bonzini , dan.j.williams@intel.com, Alexander Duyck Subject: use of shrinker in virtio balloon free page hinting Message-ID: <20190717071332-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 17 Jul 2019 11:20:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wei, others, ATM virtio_balloon_shrinker_scan will only get registered when deflate on oom feature bit is set. Not sure whether that's intentional. Assuming it is: virtio_balloon_shrinker_scan will try to locate and free pages that are processed by host. The above seems broken in several ways: - count ignores the free page list completely - if free pages are being reported, pages freed by shrinker will just get re-allocated again I was unable to make this part of code behave in any reasonable way - was shrinker usage tested? What's a good way to test that? Thanks! -- MST