From patchwork Fri May 29 01:06:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Tang X-Patchwork-Id: 11577403 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 7B820912 for ; Fri, 29 May 2020 01:06:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4812B206E2 for ; Fri, 29 May 2020 01:06:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4812B206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6AEF8800B8; Thu, 28 May 2020 21:06:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 65D8280010; Thu, 28 May 2020 21:06:28 -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 573D9800B8; Thu, 28 May 2020 21:06:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0019.hostedemail.com [216.40.44.19]) by kanga.kvack.org (Postfix) with ESMTP id 404D680010 for ; Thu, 28 May 2020 21:06:28 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E4F9C8245571 for ; Fri, 29 May 2020 01:06:27 +0000 (UTC) X-FDA: 76867966014.19.pull53_384649ce53126 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id C62EA1ACC27 for ; Fri, 29 May 2020 01:06:27 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,feng.tang@intel.com,,RULES_HIT:30054:30064:30070,0,RBL:192.55.52.115:@intel.com:.lbl8.mailshell.net-62.18.0.100 64.95.201.95,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: pull53_384649ce53126 X-Filterd-Recvd-Size: 2971 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Fri, 29 May 2020 01:06:26 +0000 (UTC) IronPort-SDR: PKqChP5RqBPLmz6B6psOZ+PqVFoS1jMKviI2m2jRKov43ybCOoQeZFN2WGPA5a8kiux9TcSCnA dLoLCxoRm2+g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2020 18:06:26 -0700 IronPort-SDR: t9036NUhHUGwWveLlQIds2EuWb519n1VXvhfA4Y1WdfrsMoWv1eWHhzwMauuq1L5xjXAGhainG 8jkg7yyatc3A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,446,1583222400"; d="scan'208";a="443187421" Received: from shbuild999.sh.intel.com ([10.239.146.107]) by orsmga005.jf.intel.com with ESMTP; 28 May 2020 18:06:22 -0700 From: Feng Tang To: Andrew Morton , Michal Hocko , Johannes Weiner , Matthew Wilcox , Mel Gorman , Kees Cook , Qian Cai , 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 Cc: Feng Tang , Konstantin Khlebnikov Subject: [PATCH v4 3/4] mm/util.c: remove the VM_WARN_ONCE for vm_committed_as underflow check Date: Fri, 29 May 2020 09:06:09 +0800 Message-Id: <1590714370-67182-4-git-send-email-feng.tang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590714370-67182-1-git-send-email-feng.tang@intel.com> References: <1590714370-67182-1-git-send-email-feng.tang@intel.com> X-Rspamd-Queue-Id: C62EA1ACC27 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: 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. 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); /*