Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1197616ybl; Wed, 21 Aug 2019 11:33:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOXik1aqjpXiE97JcGzqqOaxf0gFQ6iY9Mw/CpHFfkZlab/RPv2KzVejUUf27lDeyTnJRL X-Received: by 2002:a17:90a:d990:: with SMTP id d16mr1290066pjv.55.1566412414116; Wed, 21 Aug 2019 11:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566412414; cv=none; d=google.com; s=arc-20160816; b=YHB2FjOiZgWbEMISOm8ONjx2xo6yLAzDSJvYRXc/bYHr7rfdjxJp0NNFuKjiKXll/b TCG33LY8JzuiW/lMWydI5ydmr0XZ4MkWcxgHshWUXJ114e5mnLnSQO8/ng8DU0yUPhHZ Q9K7n1/yuo6SHBgcbUyTW4RB7quCRM/2gVt2DX4uapz2bYs1uSLrL3lgzKqq/ktKQkF8 nYIK6Ri0Oux3H13+0slyTHVLKAA3OZS3F70DGT626p0e12oLlbw+kj0odyjUJAoV9tGM MReY1/vWo+9sqvR7tc8wqcp6tIzDT11g60PKY2eiWqb2ohT/cetLVAWOjxnJMBa9ZRPa ecEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=U6z5UAUGFghdvzjH4C6pX/4JXep5tUCHLfsHPzlx9LA=; b=xo3afwFWgn6qDe+ntO884/OP6fA8Q91ThIwyhErPno/BTaYYu+7kzWBM2Odsb2u2SA Ec/evJ/x0SFR56hg8oUPk9BFEgtxXi9+vYd1j1hNqPOBDWQSb54rEFXDncoC0r8SNVvE DdoH/uADIKp33MXNjU5f3lbBSy5pR9SByeUNB9qWInF2/qcAYdYq0BIimLYC2nvG+TbN 2fmXQPfgV/d9/+ByFt6k5vQQx4qN80S8Xf6SIBbsRzg1iwGj10jmDPnUPx3AtSY8hXon gpL16arSSFcHH4LinD++9qfmzPBsBODyN7QAAk7ygkLGK12srCw4fVDffS09wndYlZQb 7IZQ== 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=QUARANTINE 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 k13si16140254pfa.17.2019.08.21.11.33.18; Wed, 21 Aug 2019 11:33:34 -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=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729780AbfHURCw (ORCPT + 99 others); Wed, 21 Aug 2019 13:02:52 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:32916 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726330AbfHURCw (ORCPT ); Wed, 21 Aug 2019 13:02:52 -0400 Received: by mail-pl1-f196.google.com with SMTP id go14so1657148plb.0 for ; Wed, 21 Aug 2019 10:02:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=U6z5UAUGFghdvzjH4C6pX/4JXep5tUCHLfsHPzlx9LA=; b=KEQQ2/DsUObRZ8/fV32XqKYLJGaF0Vc130lqJoI5kHt5ghbBQmgCXB/GWDPsmHG+er /xUR58MM/+MX5iRaxobqtJrhGAos9CUOUXDyjUs9ezngXx62Ne146O1dofynLvtWHmGp tHHwgztW/+CsDy+yQjSCd9TvXu/S8hVX/kBs61Jw6dZrkLC29JCpRU3KEGW//s9316EF tGLT+m9lqMyQyeKacT5IF0UIfrBTlDWvpeDQOps2CkBVI1fwDUZ0Ob+lXidPNvKAS63h GrsHZ5x5yztOUNrcwhHX3mNGnfiEwf+mmJ/PIHuf2S73zgIk5RratlqbzBiHWaiLhWXW ANDg== X-Gm-Message-State: APjAAAVCZCFWxMQhwuTDn6RUGupKBY82+inZfNzFtHqn7/IElNMKCEDo WsXqNnVX1DQacSCRWdeeKGg= X-Received: by 2002:a17:902:e407:: with SMTP id ci7mr20821703plb.326.1566406971488; Wed, 21 Aug 2019 10:02:51 -0700 (PDT) Received: from sc2-haas01-esx0118.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id b18sm15151398pfi.128.2019.08.21.10.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2019 10:02:50 -0700 (PDT) From: Nadav Amit To: "Michael S. Tsirkin" Cc: Jason Wang , virtualization@lists.linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Nadav Amit , David Hildenbrand Subject: [PATCH v2] mm/balloon_compaction: Informative allocation warnings Date: Wed, 21 Aug 2019 02:41:59 -0700 Message-Id: <20190821094159.40795-1-namit@vmware.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no reason to print generic warnings when balloon memory allocation fails, as failures are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before. Since such warnings can still be useful to indicate that the balloon is over-inflated, print more informative and less frightening warning if allocation fails instead. Cc: David Hildenbrand Cc: Jason Wang Signed-off-by: Nadav Amit --- v1->v2: * Print informative warnings instead suppressing [David] --- mm/balloon_compaction.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c index 798275a51887..0c1d1f7689f0 100644 --- a/mm/balloon_compaction.c +++ b/mm/balloon_compaction.c @@ -124,7 +124,12 @@ EXPORT_SYMBOL_GPL(balloon_page_list_dequeue); struct page *balloon_page_alloc(void) { struct page *page = alloc_page(balloon_mapping_gfp_mask() | - __GFP_NOMEMALLOC | __GFP_NORETRY); + __GFP_NOMEMALLOC | __GFP_NORETRY | + __GFP_NOWARN); + + if (!page) + pr_warn_ratelimited("memory balloon: memory allocation failed"); + return page; } EXPORT_SYMBOL_GPL(balloon_page_alloc); -- 2.17.1