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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 CB844C433DF for ; Thu, 28 May 2020 15:48:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 97E54207F5 for ; Thu, 28 May 2020 15:48:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97E54207F5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 29B3A800B6; Thu, 28 May 2020 11:48:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 223D480010; Thu, 28 May 2020 11:48:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EC16800B6; Thu, 28 May 2020 11:48:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0231.hostedemail.com [216.40.44.231]) by kanga.kvack.org (Postfix) with ESMTP id E789980010 for ; Thu, 28 May 2020 11:48:13 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8BBC68022838 for ; Thu, 28 May 2020 15:48:13 +0000 (UTC) X-FDA: 76866559266.24.son66_81f5d8efe2c23 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 6DDC6E051C for ; Thu, 28 May 2020 15:48:13 +0000 (UTC) X-HE-Tag: son66_81f5d8efe2c23 X-Filterd-Recvd-Size: 3666 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 May 2020 15:48:12 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id l11so28513932wru.0 for ; Thu, 28 May 2020 08:48:12 -0700 (PDT) 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=ouG0vTXmGAj+06x++6dy4/bSuy/A+T+LxvF64Ruzwmg=; b=ld84Wdndzzi5Qi2vKl7r3QECqKkTrTR2hxjx7RIySGXiE3tVssMMQ4gTdB4Nz9uLpL DQ3IeZi4nbPhiq9x1D/S29heEgdiOFfFt3sRhttDS1ZDozXHFafLnRiHYOUyUyi0+zfr ajUVIsYBVDuYAd96Y8jUJMnPAmV1evoJ+qyWTqXRiHKDykj6Uh76Jt5icLkXPsQqjCVw /v8G7GI/JnWJP+lWJMfQQJv/CNXJxYzIICO5nl1WfwKYjuPaF7q5NkUW01mI7rOeRnNG yj4JGfXZtQe5F+mUaVhaZt0dgKnkxIcHBLrE2CP6wy+P8gui7rTrOuCP8qRTatTGeDhu 22mg== X-Gm-Message-State: AOAM530K33Tx67YP2Dkpax9XGtgV48cQhZ7eKuo3bRCJOjnGo4y14PR/ iL92AU8LuUTrxpEWtSJ71BQ= X-Google-Smtp-Source: ABdhPJzQcHNKp5TZkGwD+fTTqSoVUWoSoJEjD9qq+DSxu9ct6RREji7n8yMuueaiovMAPJl5iqNKcg== X-Received: by 2002:a5d:4d4d:: with SMTP id a13mr4216876wru.252.1590680891902; Thu, 28 May 2020 08:48:11 -0700 (PDT) Received: from localhost (ip-37-188-185-40.eurotel.cz. [37.188.185.40]) by smtp.gmail.com with ESMTPSA id l5sm6381630wml.27.2020.05.28.08.48.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 08:48:10 -0700 (PDT) Date: Thu, 28 May 2020 17:48:09 +0200 From: Michal Hocko To: Feng Tang Cc: Qian Cai , Andrew Morton , Johannes Weiner , Stephen Rothwell , Matthew Wilcox , Mel Gorman , Kees Cook , Luis Chamberlain , Iurii Zaikin , 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 Subject: Re: [PATCH 0/3] make vm_committed_as_batch aware of vm overcommit policy Message-ID: <20200528154809.GH27484@dhcp22.suse.cz> References: <1588922717-63697-1-git-send-email-feng.tang@intel.com> <20200521212726.GC6367@ovpn-112-192.phx2.redhat.com> <20200526181459.GD991@lca.pw> <20200527014647.GB93879@shbuild999.sh.intel.com> <20200527022539.GK991@lca.pw> <20200527104606.GE93879@shbuild999.sh.intel.com> <20200528141802.GB1810@lca.pw> <20200528151020.GF93879@shbuild999.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200528151020.GF93879@shbuild999.sh.intel.com> X-Rspamd-Queue-Id: 6DDC6E051C 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: On Thu 28-05-20 23:10:20, Feng Tang wrote: [...] > If it's true, then there could be 2 solutions, one is to > skip the WARN_ONCE as it has no practical value, as the real > check is the following code, the other is to rectify the > percpu counter when the policy is changing to OVERCOMMIT_NEVER. I would simply drop the WARN_ONCE. 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. -- Michal Hocko SUSE Labs