Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp179459ybm; Thu, 28 May 2020 19:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+RzleGPoshi+sscmP1hdGXV+TgQ2sSFhiziOYI7niPbchvFQgOFyKptnO7MFs6F73VT8E X-Received: by 2002:a17:906:84f7:: with SMTP id zp23mr5892092ejb.437.1590720725416; Thu, 28 May 2020 19:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590720725; cv=none; d=google.com; s=arc-20160816; b=wTD+futc/+QANEk+my6/MZKEnt6T+OKasK5gpeL1+eCvznM3MYmjvsNo0J/odVNcNy ta0bPT4AVqd8dt5P6yYOFF6tdwidONxFtOZvcslQDb3gaZ4lJoXiFuAhsbDA+xOsVcD4 V2hA8qdjePpGest53yB9ElWOXu9z10nXAMDaVQUXHxkmLkcq9DbaNhyZA3OGSGcl6xxH Akmpf7YpQTzZqT0gSj6ba4Kdcq4k2sEz279KRAOtRomooZz3QXnXXfZ2bLxPLRKZkaCE dUbc7TN2oHgdlggJbbRm0YXgnLXbDNDeLvErka836mSN6aDOIDtwHjuCs9X+kOqEXPkX yRSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bOT31TWiypZmJObYsygEhpXLQD/+7tvvPPQzjH2iK+4=; b=YSW7v9/62ZfbPg83bhA5Nyszu/bcwg3stL13dWmUpSwL7Cs41mpQF4L4X26oFnGBmG VYgTQyGvTcEcACcPC2ZunlOvoRuTLNZrnHZhZAMLzWTQdHS1UMSMcfcNPW5ABsCab07y 2nQW1Uqw2s3lBzTepdN7+k3/JJuluhc9tsTsCMoiBAxNQ13R6aI1+pkhyWCkhipO0kpE iKp/CbFlFe44OdZRTB0J7BpqS5n+kwCYBZoUK60r2vgXY47ObcoN5+1kNdf4CylHY799 L0we44m4dtJ3FZBIl+9TrMp0ZrSlkU0Jh+D9odMW4AS7/i+eN5rgZMIMfSLiR7fqXxVq kMQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=HfohxZ2G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si1854393ejx.647.2020.05.28.19.51.42; Thu, 28 May 2020 19:52:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=HfohxZ2G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406880AbgE2Ctj (ORCPT + 99 others); Thu, 28 May 2020 22:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406751AbgE2Cth (ORCPT ); Thu, 28 May 2020 22:49:37 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6423C08C5C6 for ; Thu, 28 May 2020 19:49:37 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id c12so925557qkk.13 for ; Thu, 28 May 2020 19:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bOT31TWiypZmJObYsygEhpXLQD/+7tvvPPQzjH2iK+4=; b=HfohxZ2GIu5+oSUPEPf/k32GpfCruq17SI6d356N61VFNYWJF7rv7vAleBaSQ4mpQz Ez+myrFifwvsEUyqPFS2BmS3ZHET2Oal9C6dHhaizKRmKivLz8HDqglQi/8gIg1Qa0Vi PLZ5HKzFMeGgpAswmoaxuf5dZz3ewOWmGEfqx1m2eP7NpoMk3FxEhwoohTqx3AXCMhzi gjVHzD5vzaW7EBBXYK+HvqbmCrAqDTUpnrhsCKC9pi86zHKqgkeyWe7XzLBsIAc43swa dTeWA7zG4yUzGm44EG+pcq1GGwdZBGdprgizT3/JEZ98hnCy4mnb4kauExl3LLefBGOE 2FYg== 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:message-id:references :mime-version:content-disposition:in-reply-to; bh=bOT31TWiypZmJObYsygEhpXLQD/+7tvvPPQzjH2iK+4=; b=Sc/OXCHAHttZ84glc5VIquw4/nmjFXWwWn3LB7mHLuGnqArliTn4LCVQbKqSbs1Trx zS1dJ+3VKwDnOzsQKjX2TBp2dg8ve+/VEUI08E+rTXGzrftlpDEjrnxm23WEDX/WA30Y WHpxtyRfZDQw6xllVlXqRHDADJ4woEdyU/9AXOgPDN/OHqQXlLlGO8fAMM90EUw2BIYz 8CsKz1huACOL6Kl2S0UCp3zdN5rBbTkNUjUjGhC38DEpqlNBMDsD6Cmp8WiOMFnEMwhP rrRR8JwFMGHsXPEh9J0Gzs8p93XtdhZ/FqkKotrSuNofU6J/QKxgqQbwoApc00Hp2U6K RCcw== X-Gm-Message-State: AOAM533t0jm0Cs8pb5xjdrzkEE26duKr9+OYHpY/YAzT0JWHcDYWjyy0 1tD/XWnk9lr6ujG2cPAra74fKQ== X-Received: by 2002:a37:688e:: with SMTP id d136mr5134004qkc.486.1590720576927; Thu, 28 May 2020 19:49:36 -0700 (PDT) Received: from lca.pw (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id a7sm6907664qth.61.2020.05.28.19.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 19:49:36 -0700 (PDT) Date: Thu, 28 May 2020 22:49:28 -0400 From: Qian Cai To: Feng Tang Cc: Andrew Morton , Michal Hocko , Johannes Weiner , Matthew Wilcox , Mel Gorman , Kees Cook , andi.kleen@intel.com, tim.c.chen@intel.com, dave.hansen@intel.com, ying.huang@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Konstantin Khlebnikov Subject: Re: [PATCH v4 3/4] mm/util.c: remove the VM_WARN_ONCE for vm_committed_as underflow check Message-ID: <20200529024928.GA4566@lca.pw> References: <1590714370-67182-1-git-send-email-feng.tang@intel.com> <1590714370-67182-4-git-send-email-feng.tang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1590714370-67182-4-git-send-email-feng.tang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 29, 2020 at 09:06:09AM +0800, Feng Tang wrote: > As is explained by Michal Hocko: > > : Looking at the history, this has been added by 82f71ae4a2b8 > : ("mm: catch memory commitment underflow") to have a safety check > : for issues which have been fixed. There doesn't seem to be any bug > : reports mentioning this splat since then so it is likely just > : spending cycles for a hot path (yes many people run with DEBUG_VM) > : without a strong reason. Hmm, it looks like the warning is still useful to catch issues in, https://lore.kernel.org/linux-mm/20140624201606.18273.44270.stgit@zurg https://lore.kernel.org/linux-mm/54BB9A32.7080703@oracle.com/ After read the whole discussion in that thread, I actually disagree with Michal. In order to get ride of this existing warning, it is rather someone needs a strong reason that could prove the performance hit is noticeable with some data. > > Signed-off-by: Feng Tang > Cc: Konstantin Khlebnikov > Cc: Qian Cai > Cc: Michal Hocko > Cc: Andi Kleen > --- > mm/util.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/mm/util.c b/mm/util.c > index 3c7a08c..fe63271 100644 > --- a/mm/util.c > +++ b/mm/util.c > @@ -814,14 +814,6 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) > { > long allowed; > > - /* > - * A transient decrease in the value is unlikely, so no need > - * READ_ONCE() for vm_committed_as.count. > - */ > - VM_WARN_ONCE(data_race(percpu_counter_read(&vm_committed_as) < > - -(s64)vm_committed_as_batch * num_online_cpus()), > - "memory commitment underflow"); > - > vm_acct_memory(pages); > > /* > -- > 2.7.4 >