Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp438484ybg; Wed, 3 Jun 2020 04:54:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwziz5NdPQIg5RAogUPNwQf3//Q6ihFosMOvxcrksEl7qRaEIghjSMyWZbweIyEJuLx4MA X-Received: by 2002:a05:6402:1592:: with SMTP id c18mr21006068edv.40.1591185240392; Wed, 03 Jun 2020 04:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591185240; cv=none; d=google.com; s=arc-20160816; b=lnr1W/l1/zo9XUDnfc6NYqqCBn9PSocRzYC0DzAE51r0tzfpwq4gl2cdcfrMN0KYdi K73yDalEG6IV1DIGBLicCoW/SjfpYnMUyl+58A25I9LtPU2F/fza0QeVD0hX2i4AMcLU xTIeSSjchd6FE3nfrTBs8IIy1aVkTonxWgi4exi62u03wBivJHeFZKfNhAi/W7cGoSrz hj6bOYc0w+X3AOsNSlOcAPm48DUU3S3x4TFwKP9oiCJUBhO5iQGphRowBMx6F/SaaBIQ v2NCe77mHMqjjZZK0z67aQ9ojfXymQi4ccBnz4fylAqPciItQ0SqLim1+vCAKDaXhC85 N63g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=p3JkaxTmMlZLLkeQQN6ZFxzpqnMYEmIMbzLG9f6v4/M=; b=GxuNMES76kEdG3DRYtYM6lLITjjcpuHv+IXhOJxTM7pxFFfn/VlR5f2ifCo5my/Feb gy9SCRqR8wCexZTR4P5go9QPBbDeo1WsyMuoG+T6ggdWIaNZIBKn4W/K97QoCe85g/Ha 8MubRr/6quXJcs0yDbe5QoAMv6lgGeih23kYs9DZLrUhshNvbJSlO3OrGUDKeze7bqJD KgxrPVm7CdA1BAsofTID3xPySel81ozE/l1dhdWWc2kM81ZCBInLh2y1Si+n0RopWpTP cCTOZ7LVDzlvVDDvYhm3rBY4ojJx3hZXTATfSN88QYLahE9hGa+F/voAH2sVfW5pcbbX Vr7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="haKqXX/i"; 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 k14si996298edr.351.2020.06.03.04.53.37; Wed, 03 Jun 2020 04:54:00 -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="haKqXX/i"; 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 S1726077AbgFCLvk (ORCPT + 99 others); Wed, 3 Jun 2020 07:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbgFCLvj (ORCPT ); Wed, 3 Jun 2020 07:51:39 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67F01C08C5C0 for ; Wed, 3 Jun 2020 04:51:39 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id b27so1761515qka.4 for ; Wed, 03 Jun 2020 04:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=p3JkaxTmMlZLLkeQQN6ZFxzpqnMYEmIMbzLG9f6v4/M=; b=haKqXX/i+YsukbXMZduXbqPo+wBKycl/Mi30C7aBDdi599sSY0v0Rz8Lf/CilruOa0 D6KRRNztwatGP+TopP8TqKiICqVzPeeCy7xgU9Oq7o3q5qEvyoXycv9IMM2jtwDRl8Aw gAk6uoRtvarwcd0l4B6ybqjQ2KXDBp9iibjH6CF7G218cpEYX0To/4kS+lHCm+KyZbaG NNNlLkwd65xH1qZYVS4ISg826m/Kh99hT+aIR04dlRJkhLidZOyzEGe4kM4SgnIqcHxL SQRuo6N88H7NYZlHswxVpRgyAfXeLPoOOzkeXUuZqD/+8GhJBzkFvfuyhi3xc+ISWz1V W5SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=p3JkaxTmMlZLLkeQQN6ZFxzpqnMYEmIMbzLG9f6v4/M=; b=GgUdqJVSwhYOcilHdT5aZNCaeV7X+5cMiMAK99kofYareyeKJJDN2g2Qj5yHzArc3E kexOAvt5mdgwsOn+8pmNXyeJu5komO10ipjhoLDuA9JdZGaX1R4tpCq7Z9X93WDUEmPG B22PsuKLxt3aYmZqDgVMxkUbeUh/7uneSQ881emmGT9xfUtXKcBjnmrSBYhfl8VuST2w fzjziC5uPI8AJkTJTJgWU16f1ir+kYPljg7twpHzAhjVDlUnjgeZoeHgpEphmD26Yp8P SjWs+ybL89I6djrHuVw5xnsxu08PbD7Eq+CKTh/pXhXm6FJ4/p251X0ybkWHSBYxuJwK qtOQ== X-Gm-Message-State: AOAM533rm2i8BvLN/IZgymabIUCtgsBYQephcMus1eHXidwzFtPgq2dx z5+aL8mqNACwOw8V8yj5QRR9nQ== X-Received: by 2002:a37:61d6:: with SMTP id v205mr27176221qkb.447.1591185098571; Wed, 03 Jun 2020 04:51:38 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id i71sm1325426qke.75.2020.06.03.04.51.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2020 04:51:37 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v4 3/4] mm/util.c: remove the VM_WARN_ONCE for vm_committed_as underflow check Date: Wed, 3 Jun 2020 07:51:37 -0400 Message-Id: References: <20200603094804.GB89848@shbuild999.sh.intel.com> 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 In-Reply-To: <20200603094804.GB89848@shbuild999.sh.intel.com> To: Feng Tang X-Mailer: iPhone Mail (17F80) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Jun 3, 2020, at 5:48 AM, Feng Tang wrote: >=20 > This check was added by 82f71ae4a2b8 ("mm: catch memory commitment underfl= ow") > in 2014 to have a safety check for issues which have been fixed. > And there has been few report caught by it, as described in its > commit log: >=20 > : This shouldn't happen any more - the previous two patches fixed > : the committed_as underflow issues. >=20 > But it was really found by Qian Cai when he used the LTP memory > stress suite to test a RFC patchset, which tries to improve scalability > of per-cpu counter 'vm_committed_as', by chosing a bigger 'batch' number > for loose overcommit policies (OVERCOMMIT_ALWAYS and OVERCOMMIT_GUESS), > while keeping current number for OVERCOMMIT_NEVER. >=20 > With that patchset, when system firstly uses a loose policy, the > 'vm_committed_as' count could be a big negative value, as its big 'batch' > number allows a big deviation, then when the policy is changed to > OVERCOMMIT_NEVER, the 'batch' will be decreased to a much smaller value, > thus hits this WARN check. >=20 > To mitigate this, one proposed solution is to queue work on all online > CPUs to do a local sync for 'vm_committed_as' when changing policy to > OVERCOMMIT_NEVER, plus some global syncing to garante the case won't > be hit. >=20 > But this solution is costy and slow, given this check hasn't shown real > trouble or benefit, simply drop it from one hot path of MM. And perf > stats does show some tiny saving for removing it. The text looks more reasonable than the previous one. Reviewed-by: Qian Cai =