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,URIBL_BLOCKED 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 AFE3CC433E0 for ; Tue, 7 Jul 2020 10:28:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C40320702 for ; Tue, 7 Jul 2020 10:28:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C40320702 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 009D66B0095; Tue, 7 Jul 2020 06:28:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F21D56B009A; Tue, 7 Jul 2020 06:28:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E130E6B009B; Tue, 7 Jul 2020 06:28:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id CC0C66B0095 for ; Tue, 7 Jul 2020 06:28:55 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6EF2D1EE6 for ; Tue, 7 Jul 2020 10:28:55 +0000 (UTC) X-FDA: 77010906630.04.gold16_3911b1a26eb3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id B448F8003F9B for ; Tue, 7 Jul 2020 10:28:39 +0000 (UTC) X-HE-Tag: gold16_3911b1a26eb3 X-Filterd-Recvd-Size: 5276 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jul 2020 10:28:39 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id f139so45950403wmf.5 for ; Tue, 07 Jul 2020 03:28:39 -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=sEf3heMqUCLRi+DusTLtrrsJ29SVores7RlYA4VPqLsD5kqRGx9rPVlW5ulBIWNqvS YN5OajV/tb4aEdQcwmGRZfhOC5e2USNCEbX9XqGfCyKag39QHBa1060LAQ9nywVQajrU RwycppYvYYsOeTnbtsEXYvEysxAdwPrMIJgEZFQlQ+g1+sJ+i/Gn7+c+MHSW/1tKJoMC HstQebkuL6TS9Qf4kRMSEPXMtpTJjyiYld9gHiZcqSpJxe/SkAKkI/f7EMxHZUY3+1/A Tj+7KtvbA8E0P7vknr1vgkm1feiWxf2x7dVoy3Y9QJK5xYSfweFQTR8VregTQZFS01FH D8YQ== X-Gm-Message-State: AOAM532MKw/rVf099SGsC/ghtcBAoz9Y1l45qINm6pTG4rxnxqH2MxV+ roH9wIPlGjgiY1mK2NYYWbA= X-Google-Smtp-Source: ABdhPJxSRv/Jy+YzjF1IdFV7nYK/ayucM1zWbPivKXkRs7+doAYqRFDABnC4xnZ8WeDm1/U7v1CgqA== 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> X-Rspamd-Queue-Id: B448F8003F9B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 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