Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3989780ybg; Tue, 29 Oct 2019 00:02:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwPxF9G2p8Fev5qc0XasR1cwSpCpimwH+ya7jUdwmU/a1u3FnV/egjutwjRj5vFfg85H5g X-Received: by 2002:a17:906:86d5:: with SMTP id j21mr1651365ejy.219.1572332530326; Tue, 29 Oct 2019 00:02:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572332530; cv=none; d=google.com; s=arc-20160816; b=GyLqv8uHYFdamth4N3HS4H/MXzabZmeRiB4VbGns0uLbZjN6hcxi8x6bWIeMsiYTrx WyoXu8HY/LHGaSpEb3cZ9D8zYzFP4PF3eXUZfigGP7Mos+qb49ae6w9HUVryWdFkw7ZJ WIJrmZ5S9QtX3XZMX7663tsIAhjq3oE5VGFhvHcE+qWy8SUOKFLfhmUjeYPu+5j4eoS2 JxmuCLoERq1JraIXC30awsvrwxWAEZ4BaSlXo9O7ma6hYbKqWy40FUhyUI/OAUTfd1dR Si9sGTHMPc+GN476gbMShnvMosYxfptEgi58WaJTjoxnYjtKQqsWsk6N8zmhBN5n3K+j 7z1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=AiTM/hFzZNrdOB9v4mD66XPt2o1IDEJmA43+q3Xscl4=; b=FIWmmYZn4jUJk2D4uMV5m8hzPqUmTiJMNvsKw1SVLh59txRAUYVOSL6lM0jn7tXe2P zBGq8e2pW+n0YQUcNVVIJbhLMCa9BJHlpAtX3PrB5B+zMda3OeEI5NvO8OT6DDxJ2WIg A6uVF+4hl0NMQk8lQ7LG8ohItT5ZmrFbbOFMkcFIh77YGx390Zj/y9/gAsSpNme0S2Wk /nKjforU4gcMJa6oohlOXF43kdxsYMlG3EOOzSZxf/4i6U62tXLz2bYZC2CkyKgDUMs1 oz9iqDNE8ZlJiOMFka8/aMe106d8PmIbsNeDToXkLZs0VJRrh1TEIqsWPLlaEW+edJVm QnSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dVim8Y90; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18si7479109ejk.105.2019.10.29.00.01.46; Tue, 29 Oct 2019 00:02:10 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=dVim8Y90; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfJ2A1C (ORCPT + 99 others); Mon, 28 Oct 2019 20:27:02 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43335 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725829AbfJ2A1C (ORCPT ); Mon, 28 Oct 2019 20:27:02 -0400 Received: by mail-pl1-f194.google.com with SMTP id v5so6600143ply.10 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=kmkdXdeXeLbDW7wGmusxZYWpnIzCK2kcDaTiMBsrLXrzthVs2c3nfl9MSfT04nsmXX j3yN9Oei6sN6kLJUpAYziIuTCxFFeASFDHuEp9yQvr8SqExo2p61nAaOmTfm5cxP7DAY ZAqFDogcMquKQp5IiRD48MPa4KDxxUjCFxqgKRopvKvm82pg9LPTD4Mp/1Livp+Onv2h mAS4ZevCsSRNVosQ/mQIUQAvXlpafHwtvcsGrXTTkyvDP5k1cV5XFcvvHLJ0s8cZ81Bb p966ZCu4+YGc+AwIaotn7uxHy1sJLj5lWN+kTfQDyO1+8gxGds8nhxO4LAiYBEgSVNjE 5Dng== X-Gm-Message-State: APjAAAVvyqw/717R19XK25esZUVTUOL85WVd3ZJ0sZ5m482tJt0kELBR Oxzj2VDJIKGY4iE7cR6e2uETctOXfT8= 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.