Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp130901ybm; Thu, 28 May 2020 18:09:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytS8CsgH1gh2XVBpPNXCcO6T3ikX339XeNqR0fOhsjLDbUlnQal6jY1dkiYx4WB59CvUZO X-Received: by 2002:aa7:c444:: with SMTP id n4mr5901643edr.308.1590714568783; Thu, 28 May 2020 18:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590714568; cv=none; d=google.com; s=arc-20160816; b=vvfq8f3i9fkkgApd5bNV5C/5TPGLOf5iFLyX/XlbgujFq7B3yL2+M1Yly5D4u8vtLU 08cHOoh4p8nbeR+WdSD7cicsJQ/ECuG2UI+0u6Y4jfAZHzCY7T/EHoB10YHFpHJIMZft aH/0p2jAspJBaPrjqEXesvL1U5+ER7Ea+8sWwewaVYo5M5NIyPqtYC8GUzhnTiOikD5X /Dm3sMedN31oQQhE9E/RwAbKagHxxE+dR3XlEE4BcgxiQ+sVZ5MehUTffOUyx8W4pdJC 4+Z3CxkVCzkpm1bO+qEk+FdU9N+gqe2heO5gZtLtjmM0jiEt/3ct3YRZg+0Ru/EIO31X ss4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=xISw2/inCWfOENivkKnseVaZNkqoMEBDazqhYZynJwk=; b=Nv8myI453X10SjQUQdsUPR0jEzkZ3rDz80jfpJ4qy/KDiwm8bp8w4bl7vQbuytTTlB VpzknNPup0y+J6+eVXtJZwQPbh2Y9pOxv+M/4OYDuE3uJUYsf8Fid/8egnh6m1GcBOmy jvR+ODoVMn792tAM+NRJc84cltYNerplHudnDABlFza0sci7w7d6qW/9LxQC43I+GcGK HCg7U0AAS5/rWRKUv84NKwotVNnXY7J0OBPDXiKrPSYMKM3Kfyvc0N4BMSF5J+W6//lR Ld49Q4Bmop44EbMXBffSsjDaMcDs8PxCFKhQJ/6+16PNezkG3hCujPvqTz+N0eMHj+hE sEvQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si4747419edy.21.2020.05.28.18.09.05; Thu, 28 May 2020 18:09:28 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438319AbgE2BG2 (ORCPT + 99 others); Thu, 28 May 2020 21:06:28 -0400 Received: from mga17.intel.com ([192.55.52.151]:2379 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438312AbgE2BG0 (ORCPT ); Thu, 28 May 2020 21:06:26 -0400 IronPort-SDR: kEIJMm9qel9FpjkjNRI67hhCsolEkE/+RvGPxcZiWGUB+ae7HndrRjOToI0ftzD6usWzih2Hej OwoOf4NitAag== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); /* -- 2.7.4