From patchwork Wed Aug 21 09:41:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nadav Amit X-Patchwork-Id: 11107545 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D061D14DE for ; Wed, 21 Aug 2019 17:02:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A718D2332A for ; Wed, 21 Aug 2019 17:02:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A718D2332A Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=vmware.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DB3E46B0325; Wed, 21 Aug 2019 13:02:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D8A6E6B0326; Wed, 21 Aug 2019 13:02:53 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA0AD6B0327; Wed, 21 Aug 2019 13:02:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id AA60D6B0325 for ; Wed, 21 Aug 2019 13:02:53 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 3C3F1180AD803 for ; Wed, 21 Aug 2019 17:02:53 +0000 (UTC) X-FDA: 75847054626.03.shop64_8d902dcc89a05 X-Spam-Summary: 2,0,0,1972d7dbb6ba1ee0,d41d8cd98f00b204,nadav.amit@gmail.com,:mst@redhat.com:jasowang@redhat.com:virtualization@lists.linux-foundation.org::linux-kernel@vger.kernel.org:namit@vmware.com:david@redhat.com,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:3868:3871:3872:3874:4321:4605:5007:6261:10004:11026:11233:11473:11658:11914:12043:12297:12438:12517:12519:12555:12895:13069:13161:13229:13311:13357:14181:14384:14394:14664:14721:14775:21080:21444:21451:21627:30054,0,RBL:209.85.214.195:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: shop64_8d902dcc89a05 X-Filterd-Recvd-Size: 3571 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Wed, 21 Aug 2019 17:02:52 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id f19so1654111plr.3 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=Zd3fcP2qaH+sRUq4svcRztPmWz+nYQZFYyjBrNP9DwIyCQKaF53mxS5dNmykwopLf0 /9F2+yjb3uE9YEjrIi5FNNSnz4/gfIx1mT+2FlFAMKc1MS3IuIKPSQW1Y3V1+bsxtGGH gaH7MNZjxymzjFmqCOJU8f4F3AUAxgGQC3WxuMbRlODNJl3mOzwphw63ufhsy6tOsIKT 193bWpp/vp5b+0zZg7QbvV0JOogwmuG6XmzFc1UVN2UiPVzHmvbZ3oH3hDVDIJzEXT4U AC7ol/GF91qnT4XPiDfYknSKxhPX653Oz5j3hNv6nOtylGlnzmfJBseFXouCIA9K5oe3 Vxtw== X-Gm-Message-State: APjAAAU21y/EwUiNn+TRIlJT3FTLbav76hbclhSBfVxirtF5vugU6np7 lDgyFnCt4bOOa7JCvpY+o5U= X-Google-Smtp-Source: APXvYqwSHmzMs89oPrC2mo0cPIKVAkb2F9Ln2a5cPO2U0/JORRLOHxSXJwFKQGFE12cP6dDufj9BgA== 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.010679, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Acked-by: David Hildenbrand --- 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);