From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47942CA9EC0 for ; Tue, 29 Oct 2019 00:27:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD47F20717 for ; Tue, 29 Oct 2019 00:27:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="dVim8Y90" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD47F20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 387CA6B0005; Mon, 28 Oct 2019 20:27:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 338816B0006; Mon, 28 Oct 2019 20:27:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2274D6B0007; Mon, 28 Oct 2019 20:27:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id ED4796B0005 for ; Mon, 28 Oct 2019 20:27:03 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 74FB0181AEF3E for ; Tue, 29 Oct 2019 00:27:03 +0000 (UTC) X-FDA: 76094932326.22.dad68_77c6f3da57904 X-HE-Tag: dad68_77c6f3da57904 X-Filterd-Recvd-Size: 4354 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Oct 2019 00:27:02 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id x6so2560791pln.2 for ; Mon, 28 Oct 2019 17:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=AiTM/hFzZNrdOB9v4mD66XPt2o1IDEJmA43+q3Xscl4=; b=dVim8Y90Dyajv7eOjSYoa9T+ycqr3W9RATP53DHR8qvHal8FTWUnFjjKOGYzC91GIu z2XjoBMN0EllhKSi74vfTdzGuwKW6LoRQILzeLXASn/BmnsashLhZqkvIQmZ93zPY2W8 eXCBG+6tmKgxMwkn2jnPs2ZOa7lBVA7okUXQ6B7mY3IS+SZn75ZDkLmwqxCKUuOkUIeh vOb3lzhMuhoxE1RS7wbGTIYHU0Dpfsoo7Dao31Q9hc+QKhjpc1AXAhCAlmh1/7OzVahS YWBfnuYMTHpRgxoCNcTp9vYleduPPmX8c4WWU+us6tRUqAUEw9Ow45NsB4clG4M0zSnr OXSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=AiTM/hFzZNrdOB9v4mD66XPt2o1IDEJmA43+q3Xscl4=; b=QM9N27N93x441hL2Paohoy2Ug+UA83E/MI2yi9KTkQZtrii8qRCa6vMk0obbC1yHDU x8RM3BYD/I7pEFxOfBGHRNqkAt+S7TRJMZa4FEbWksCAKEL+chE8tSo9cwzBa4RJhLgB dR1Px1oNFKboYqEJZvttB2C3jTemPSEyJVsDYb9CoGJoSOqS1/B1e2xaxMJ8VVFv02aM 8zutsOi2EywANHz3ypxr3fHEhzbdJNR0glbzH4mGds2z00XB1/Z2xjmf2yfA77qCVcps dcCtBMIx/1SBIn2+PywbO+ajlpTOBb2xRbz43PyVfqzxRK+Klbllyi6TM+GsdhAZnoiU Jh7w== X-Gm-Message-State: APjAAAVJEYYEwMt7VrL+WD1uSOx3O5ldpO5d9zyQ4tLPLg/RyM9mJUpD YF9470BH8PaAbmU767uUolPqeA== X-Google-Smtp-Source: APXvYqygLn7Pq3MlrbpOgp3ztQYhCvqUx9AFtRxN+xXp6Zxq3MQnQDnMzOIdk5WMXNf/GfgxLDTmFw== X-Received: by 2002:a17:902:a717:: with SMTP id w23mr870220plq.177.1572308821720; Mon, 28 Oct 2019 17:27:01 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id y16sm3469063pfo.62.2019.10.28.17.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 17:27:01 -0700 (PDT) Date: Mon, 28 Oct 2019 17:27:00 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Johannes Weiner cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: rate-limit allocation failure warnings more aggressively In-Reply-To: <20191028194906.26899-1-hannes@cmpxchg.org> Message-ID: References: <20191028194906.26899-1-hannes@cmpxchg.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: On Mon, 28 Oct 2019, Johannes Weiner wrote: > While investigating a bug related to higher atomic allocation > failures, we noticed the failure warnings positively drowning the > console, and in our case trigger lockup warnings because of a serial > console too slow to handle all that output. > > But even if we had a faster console, it's unclear what additional > information the current level of repetition provides. > > Allocation failures happen for three reasons: The machine is OOM, the > VM is failing to handle reasonable requests, or somebody is making > unreasonable requests (and didn't acknowledge their opportunism with > __GFP_NOWARN). Having the memory dump, a callstack, and the ratelimit > stats on skipped failure warnings should provide enough information to > let users/admins/developers know whether something is wrong and point > them in the right direction for debugging, bpftracing etc. > > Limit allocation failure warnings to 1 spew every ten seconds. > > Signed-off-by: Johannes Weiner Acked-by: David Rientjes It feels like the vmalloc warnings should be treated with their own ratelimit (pass a struct ratelimit_state * to warn_alloc()) but that's outside the scope of this particular change.