From patchwork Fri Sep 7 11:43:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 10592109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D96CA13AC for ; Fri, 7 Sep 2018 11:43:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8F7B2AC72 for ; Fri, 7 Sep 2018 11:43:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD3F12AD52; Fri, 7 Sep 2018 11:43:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5956F2AC72 for ; Fri, 7 Sep 2018 11:43:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 482C16B7E28; Fri, 7 Sep 2018 07:43:56 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 42FA66B7E29; Fri, 7 Sep 2018 07:43:56 -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 3468D6B7E2A; Fri, 7 Sep 2018 07:43:56 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by kanga.kvack.org (Postfix) with ESMTP id EBC906B7E28 for ; Fri, 7 Sep 2018 07:43:55 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id g5-v6so7163730pgq.5 for ; Fri, 07 Sep 2018 04:43:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=YF1OHIhmAVlWCr6F/ebiZrS2h57vs9fWzePNwoliCyI=; b=HovTh1DFQOzh//SgYri4sPS9u63o5Ow/8yuyugSHcYkFY3vWfzrI7ZWk3w/cEcLhZY 3+dL1mWidFwdJfY2FxJV4ELbTb8HghC/rib6cRGsjzgXdO6OID7hkuWyyXzU7HFw61jF 7oAs4BGV2HWicAS3NhuLQr4BCANpNw5c7JYmLkmeefutxL2kqgR1UkFn5K9p0CJPTCRW 8V6eTgwLYCV/9mgS2JUQ984PxhqcE/LqIhAYm9Hk/vyZQdMsoPNXNsXlT4GiHE4oMLwk akQLyv8nWj2gLRH2cPEHE0zlT5WcEgOnIUkr62I6hqPtOwm+c27nj0qbvEaYkf9EGVah GNGA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Gm-Message-State: APzg51CU2H/aG/2emHq/fYqe2pJpifVil79Onfv8013Y1qLexCEq0K3A N1aWdva36VTczeBvuJJ+iB5EaquulZW7HjoWPUdU8R/ZaxEy1Yw5Syqtth3mYrlYzEMOvZ3oWT/ BLIm51zQQ7XZ4GLHwIicYIF5wiojXVP3SQewrK6oMfvAK/ee0HewHthZveUz8/NuhR51CH8U1V1 QCjYOuvjgqYIOkVJII88u4/yodAB7OZI0UklfY29pMevd8WJFECmENeq4DoqEv/e7iOITVyp/2z DfIUgVbnoCcqn+Vb4dHhymxYTS6ZB4xQtZFXvK47oYvsSCR4V8DMODVU5RwHUpu7J2vlsc22B7o PtgzPxBkQtSC1stXxH+NJGXBFAMmq15gu1IMAYVhIWscVWfBnfoqiwfApCBZvUoWy33miZ1tVQ= = X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr7827207pgh.28.1536320635652; Fri, 07 Sep 2018 04:43:55 -0700 (PDT) X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr7827163pgh.28.1536320634901; Fri, 07 Sep 2018 04:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536320634; cv=none; d=google.com; s=arc-20160816; b=gzlbZoXWQXJJYjBHYi8AQBeGSOomXa27FgXKuTSVoQdcc4zhaqRT/8LAt28j3fojMr Yu7Q5/S0LGWr1zuBxPLzoeid0diZhMyPoP7Vpb8zuO3lEDkMOJSkZwFC4qotW9yKgwvy Wjo/XjEAIUQ6caURqt0tUtORyeknzImfeoWVYPRhPg2wfVJv8lgtS/9bo1PjJyWNzgZ2 cduasbLw6oPlUBlQrN1WB8W3kIlzQ8XcAy3wMaNrOprfqkZJc0ZhJbq47hJ76XhdZiJ1 cO0N48tLzQTbjXZLzfcfpEJdKvMj0r7Uh0HYloYQogYSd3BOrt8yNx5RsY1zpc39PggH QDEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=YF1OHIhmAVlWCr6F/ebiZrS2h57vs9fWzePNwoliCyI=; b=zyBxbyAW+n5LrURtzJM98bwnzbmbvus6zWutFIfAAtV2W+SK3aH0ehvJqw0MnygQCr bC/GCfGYvTQiKqvrlY/o9t0ET461+LXluT4gPfkNa2+YwQEZ9qsDGy721G12GyA8LEUV cJVyp7K1RC92Z/gioy7kDVt2oqXcr3Z96esuAvRolXJSdbd3QQD++5VjEVlQXWT0mrUd zSX2rzvWzRkKcD2cqgMqD8N/zvhTyybkqlrB1c0+aBbFIX5anpTwaxyvHQGmt4Y6sMw5 sA8lz5djagGOvmMitnGhfffxev9XZAyx4OLuwzTPBQb7uma91CPYTxs3Jsp+BAw6DGkA hZdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id g16-v6sor1378994pgg.427.2018.09.07.04.43.54 for (Google Transport Security); Fri, 07 Sep 2018 04:43:54 -0700 (PDT) Received-SPF: pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mstsxfx@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=mstsxfx@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Google-Smtp-Source: ANB0VdYfStOeiFdj3bRCZPAICp3nZzztaYZH7VAmsY4H1mN6L6/1ki1ZNEnT2gd21phjt12QxzEOvg== X-Received: by 2002:a63:d806:: with SMTP id b6-v6mr7661165pgh.347.1536320634376; Fri, 07 Sep 2018 04:43:54 -0700 (PDT) Received: from tiehlicka.suse.cz (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id w13-v6sm8628258pgs.89.2018.09.07.04.43.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 04:43:53 -0700 (PDT) From: Michal Hocko To: Cc: Vlastimil Babka , Andrew Morton , David Rientjes , Mel Gorman , LKML , Michal Hocko Subject: [RFC PATCH] mm, page_alloc: drop should_suppress_show_mem Date: Fri, 7 Sep 2018 13:43:34 +0200 Message-Id: <20180907114334.7088-1-mhocko@kernel.org> X-Mailer: git-send-email 2.18.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Hocko should_suppress_show_mem has been introduced to reduce the overhead of show_mem on large NUMA systems. Things have changed since then though. Namely c78e93630d15 ("mm: do not walk all of system memory during show_mem") has reduced the overhead considerably. Moreover warn_alloc_show_mem clears SHOW_MEM_FILTER_NODES when called from the IRQ context already so we are not printing per node stats. Remove should_suppress_show_mem because we are losing potentially interesting information about allocation failures. We have seen a bug report where system gets unresponsive under memory pressure and there is only kernel: [2032243.696888] qlge 0000:8b:00.1 ql1: Could not get a page chunk, i=8, clean_idx =200 . kernel: [2032243.710725] swapper/7: page allocation failure: order:1, mode:0x1084120(GFP_ATOMIC|__GFP_COLD|__GFP_COMP) without an additional information for debugging. It would be great to see the state of the page allocator at the moment. Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka --- mm/page_alloc.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 89d2a2ab3fe6..025f23dc282e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -3366,26 +3366,12 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags, return NULL; } -/* - * Large machines with many possible nodes should not always dump per-node - * meminfo in irq context. - */ -static inline bool should_suppress_show_mem(void) -{ - bool ret = false; - -#if NODES_SHIFT > 8 - ret = in_interrupt(); -#endif - return ret; -} - static void warn_alloc_show_mem(gfp_t gfp_mask, nodemask_t *nodemask) { unsigned int filter = SHOW_MEM_FILTER_NODES; static DEFINE_RATELIMIT_STATE(show_mem_rs, HZ, 1); - if (should_suppress_show_mem() || !__ratelimit(&show_mem_rs)) + if (!__ratelimit(&show_mem_rs)) return; /*