Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1137540imm; Wed, 26 Sep 2018 12:19:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV60FdSwWNxCby7aZmXfd1uzhbBB4UQKqgfitFD/PRe8TRHf0nV2ig98YhczMHlOL7uSJKZwP X-Received: by 2002:a65:4c43:: with SMTP id l3-v6mr6856352pgr.451.1537989547513; Wed, 26 Sep 2018 12:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537989547; cv=none; d=google.com; s=arc-20160816; b=dsLRFtFWN4LZMdh/yheO/BJpNvfq6vzJZ1bKDED4N5SCW88PRLuWHiu707VZiVCjG3 teYh2GCfmHWtE1z8Fmthaydc8uhiHlCA3SZHodwUXOyqCjHp3YkCX7+Q31aND+07Islg 6T6hfo6xE1bLq/U5HgaY8IYv0barPUCQIDkrng12oIFyC1e6AieujGxGVlpws9SJC6f9 zu+kZinSrFwrc00ScPQnYr4Kum4kWBVvSKFDHLt4I6cc7hb624YehXpGwh1iC01+xIaW uKxgjunaQDhklCjPA06gWxJoahL2bLlp5HK2S3PRJ4Iv2rkQcFpTlhkmj3JbDQghvsYF RKpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Ez2vr+zejNJ0EFWq87QYQHZXseFFKNLw+kXV03IWx5g=; b=s40VXiheltfXSRH9IeyrO+KJzrChh6IuQ/jls+92oXChPITjmfoOdt32QvClWeC/e2 1hlpm2ce9c+BlHuNIZ4zlmf90wOqlSIjHdEpZYkEQq9CSwdv0/ENdaZMthjb1BTY4s89 ARjGYm55wUhBB/Xvtdw+FB2GSIbbPoYSl8Q8s/7iT+XKN4A5dQKINP558h/pPJ/IltIL 3IOU54lzMlKzB6Y8/Z9zL3YJLg/IS2ZTVdfAURXDXK0kUrUywat88ufFSkbgC0e4tneX kEn43GAwzQiWF+uRRHIsi/hhGexd/iKtT/RK0bec0FMGESm3XhFYtFxYqKLEKJWK29Lj E10w== 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=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a61-v6si6254655plc.80.2018.09.26.12.18.52; Wed, 26 Sep 2018 12:19:07 -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=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727253AbeI0B3h (ORCPT + 99 others); Wed, 26 Sep 2018 21:29:37 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:25069 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbeI0B3g (ORCPT ); Wed, 26 Sep 2018 21:29:36 -0400 Received: from sc9-mailhost2.vmware.com (10.113.161.72) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Wed, 26 Sep 2018 12:15:04 -0700 Received: from sc2-haas01-esx0118.eng.vmware.com (sc2-haas01-esx0118.eng.vmware.com [10.172.44.118]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 427DFB05DE; Wed, 26 Sep 2018 15:15:09 -0400 (EDT) From: Nadav Amit To: Arnd Bergmann , CC: Xavier Deguillard , , Nadav Amit , "Michael S. Tsirkin" , Jason Wang , , Subject: [PATCH v3 00/20] vmw_balloon: compaction, shrinker, 64-bit, etc. Date: Wed, 26 Sep 2018 12:13:16 -0700 Message-ID: <20180926191336.101885-1-namit@vmware.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-002.vmware.com: namit@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch-set adds the following enhancements to the VMware balloon driver: 1. Balloon compaction support. 2. Report the number of inflated/deflated ballooned pages through vmstat. 3. Memory shrinker to avoid balloon over-inflation (and OOM). 4. Support VMs with memory limit that is greater than 16TB. 5. Faster and more aggressive inflation. To support compaction we wish to use the existing infrastructure. However, we need to make slight adaptions for it. We add a new list interface to balloon-compaction, which is more generic and efficient, since it does not require as many IRQ save/restore operations. We leave the old interface that is used by the virtio balloon. Big parts of this patch-set are cleanup and documentation. Patches 1-13 simplify the balloon code, document its behavior and allow the balloon code to run concurrently. The support for concurrency is required for compaction and the shrinker interface. For documentation we use the kernel-doc format. We are aware that the balloon interface is not public, but following the kernel-doc format may be useful one day. v2->v3: * Moving the balloon magic-number out of uapi (Greg) v1->v2: * Fix build error when THP is off (kbuild) * Fix build error on i386 (kbuild) Cc: Xavier Deguillard Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: linux-mm@kvack.org Cc: virtualization@lists.linux-foundation.org Nadav Amit (19): vmw_balloon: handle commands in a single function. vmw_balloon: unify commands tracing and stats vmw_balloon: merge send_lock and send_unlock path vmw_balloon: simplifying batch access vmw_balloon: remove sleeping allocations vmw_balloon: change batch/single lock abstractions vmw_balloon: treat all refused pages equally vmw_balloon: rename VMW_BALLOON_2M_SHIFT to VMW_BALLOON_2M_ORDER vmw_balloon: refactor change size from vmballoon_work vmw_balloon: simplify vmballoon_send_get_target() vmw_balloon: stats rework vmw_balloon: rework the inflate and deflate loops vmw_balloon: general style cleanup vmw_balloon: add reset stat mm/balloon_compaction: suppress allocation warnings mm/balloon_compaction: list interfaces vmw_balloon: compaction support vmw_balloon: memory shrinker vmw_balloon: split refused pages Xavier Deguillard (1): vmw_balloon: support 64-bit memory limit drivers/misc/Kconfig | 1 + drivers/misc/vmw_balloon.c | 2198 +++++++++++++++++++--------- include/linux/balloon_compaction.h | 4 + mm/balloon_compaction.c | 142 +- 4 files changed, 1578 insertions(+), 767 deletions(-) -- 2.17.1