Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp916334ybt; Tue, 7 Jul 2020 03:29:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyQdLPN5r4wq3oduM5JnS2URDFpYK3bwG2By0AEPnXd8tCmoKea6ixzLDytl3mLyoCkpDa X-Received: by 2002:a05:6402:1a42:: with SMTP id bf2mr52749971edb.292.1594117796161; Tue, 07 Jul 2020 03:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594117796; cv=none; d=google.com; s=arc-20160816; b=NQeAcFDXaUA/AlRlI6nhLbkQmIB8GRFTNHzkxsLul+Gqp7iDbIyPWswgIh8s0wqUWV A8/7VgyjHxWrwKRj8x3TZAv1a5xJhmvqlAgVPCKsBqJ89RncBeGwgaXpd7zFgr3D2FB2 F8QJNPMX2vD9EjJn4ZaqsOoc4tBPZCHle99BR7M5E2vjiKlIfU5Bq/sa2eZRGdos3bt7 brGKVMQYE/IMN4fVvZaOY8TJjXPEtFTfXt4iE41/sDjW7QeioDTwkPK6m8K+35dsapJ5 rpdcqDHzbcu3QrKIxvvd4QiF6/lzs2mC0MVVtmi9WdBffOMxcWHiNXliACYs8/+kGSQ2 eoew== 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; bh=7xEHe53nkOvtQEtBBQA2XJt6Y8h12NwG7k86WiRp378=; b=BVz128FLNPLEMDSdFSqxQDmcqM6dJSPu2mxRRV0keusFumw+YVvLZyoOzRVg+FpBnq CfUBBOX+NOlsH3LccMaNiLjkmUM0Y40CKHdpXFtB5vhMd0tGJszTn2vGCk2XP6oregTE D7Y/j5SlTwFzvhz6Fo91vzNge1UTKW346YteqA1b4P7jzPn3gDBt/yNfAdsDeJb5jmfn LXo6b+p0CNsy5ryrIgmNXTNH3jNEO1w0q9yW7bSl0hiLkyk8ne6FwoCMP91hkgsgckVC cftS5ojgPTyEH9Ll5XFNkh66tjprbMUBofURyJh3ky5QKN0Xm8Qmo8XZe5lFevoZOxRU R0rw== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si14619089edh.256.2020.07.07.03.29.31; Tue, 07 Jul 2020 03:29:56 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726757AbgGGK2k (ORCPT + 99 others); Tue, 7 Jul 2020 06:28:40 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51103 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbgGGK2k (ORCPT ); Tue, 7 Jul 2020 06:28:40 -0400 Received: by mail-wm1-f66.google.com with SMTP id l17so42726061wmj.0 for ; Tue, 07 Jul 2020 03:28:38 -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=7xEHe53nkOvtQEtBBQA2XJt6Y8h12NwG7k86WiRp378=; b=Agzgy4tGUYX3M0w0wkFOtiZttjm1GDsOPfMd6nRns+YM3FSFV6fXLsF6xwf+orZAGW mON8EXispiL1iAAp5udzrjYPgpCXW+zd+XZ4iwescyWMpyn9x7U4cbLm3bwOvlMMaCxz Atfy8l7pbIOMqvB6ca4lEqFSIW32qGTgWB8kvHuyLpZjg6vFFsR+Gahtwzxnr9c3jnQI eClpCDULvFPpVs9uE4dKmqOo68NDPUvmPMCVvtAJgBeCvw3y0l0dKMH5gB88cygvNn4s zKog7H4fxZQTbYNEWtYH8gAaEfEnMTgtu0A3qgtrqpGpj1fcYfHRyM1Gn1HrcFF2zKvj 176A== X-Gm-Message-State: AOAM533OTLMFXMvkwahGRFAd5u+KOJtpBgXDR4RkTLVp6mRkJQH35+r2 exSLBPeHKm6i/A9ggh4f39ZNPIs+ X-Received: by 2002:a1c:1d46:: with SMTP id d67mr3745590wmd.152.1594117718227; Tue, 07 Jul 2020 03:28:38 -0700 (PDT) Received: from localhost (ip-37-188-179-51.eurotel.cz. [37.188.179.51]) by smtp.gmail.com with ESMTPSA id g13sm385407wro.84.2020.07.07.03.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 03:28:37 -0700 (PDT) Date: Tue, 7 Jul 2020 12:28:35 +0200 From: Michal Hocko To: Qian Cai Cc: Feng Tang , kernel test robot , Andrew Morton , Johannes Weiner , 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, lkp@lists.01.org Subject: Re: [mm] 4e2c82a409: ltp.overcommit_memory01.fail Message-ID: <20200707102835.GE5913@dhcp22.suse.cz> References: <20200705044454.GA90533@shbuild999.sh.intel.com> <20200705125854.GA66252@shbuild999.sh.intel.com> <20200705155232.GA608@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200705155232.GA608@lca.pw> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 05-07-20 11:52:32, Qian Cai wrote: > On Sun, Jul 05, 2020 at 08:58:54PM +0800, Feng Tang wrote: > > On Sun, Jul 05, 2020 at 08:15:03AM -0400, Qian Cai wrote: > > > > > > > > > > On Jul 5, 2020, at 12:45 AM, Feng Tang wrote: > > > > > > > > I did reproduce the problem, and from the debugging, this should > > > > be the same root cause as lore.kernel.org/lkml/20200526181459.GD991@lca.pw/ > > > > that loosing the batch cause some accuracy problem, and the solution of > > > > adding some sync is still needed, which is dicussed in > > > > > > Well, before taking any of those patches now to fix the regression, > > > we will need some performance data first. If it turned out the > > > original performance gain is no longer relevant anymore due to this > > > regression fix on top, it is best to drop this patchset and restore > > > that VM_WARN_ONCE, so you can retry later once you found a better > > > way to optimize. > > > > The fix of adding sync only happens when the memory policy is being > > changed to OVERCOMMIT_NEVER, which is not a frequent operation in > > normal cases. > > > > For the performance improvment data both in commit log and 0day report > > https://lore.kernel.org/lkml/20200622132548.GS5535@shao2-debian/ > > it is for the will-it-scale's mmap testcase, which will not runtime > > change memory overcommit policy, so the data should be still valid > > with this fix. > > Well, I would expect people are perfectly reasonable to use > OVERCOMMIT_NEVER for some workloads making it more frequent operations. Would you have any examples? Because I find this highly unlikely. OVERCOMMIT_NEVER only works when virtual memory is not largerly overcommited wrt to real memory demand. And that tends to be more of an exception rather than a rule. "Modern" userspace (whatever that means) tends to be really hungry with virtual memory which is only used very sparsely. I would argue that either somebody is running an "OVERCOMMIT_NEVER" friendly SW and this is a permanent setting or this is not used at all. At least this is my experience. So I strongly suspect that LTP test failure is not something we should really lose sleep over. It would be nice to find a way to flush existing batches but I would rather see a real workload that would suffer from this imprecision. On the other hand perf. boost with larger batches with defualt overcommit setting sounds like a nice improvement to have. -- Michal Hocko SUSE Labs