Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3364128ybd; Fri, 28 Jun 2019 07:23:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKUfMZLzD2LYoN/9iY6AE+XOLk2K6fTkFb6n8P4+EH5L94U2/YCvevWMYDU0RV+Zhbg6Ak X-Received: by 2002:a17:90a:a489:: with SMTP id z9mr3314092pjp.24.1561731795370; Fri, 28 Jun 2019 07:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561731795; cv=none; d=google.com; s=arc-20160816; b=0w04S2hw1zZnBaDZA+11RBKYVRj7g4Tr8Vo2gXu1OO8107o2zzFBs4qv7BAJkbakWV NbccO5qXkfLJ8w8OUjj46TqqEm4yW3yuTvLHrj0m4jmM0o3CQnsXTAhqcs2ibAgHbVWr YZFU8l+Yys4rtHmZAAkiqpBmHHcjqeveBkLcj0yaNjsmde11qaPcvdR/Ybi4CH736u7g IDTjmM3zfQsJJOGKxIi6AOUUDMETKRgCQcDAjB9wMSyhRQ9mzmoPy9swbAwCRFVUgbzK tT70+eX6lkjYAvLrjOtv6ojEC59jFvgxPT9ayis/WDYniNq4FPBtyw0zUaKj9VJsC+ip fiIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WVmn8V88QNGADn+4BzJOKwnY0rFHsOXAlq7BOgZNCGc=; b=qhF38OSeEsiIp399y92wVroav5xIMZwRDhXCPE75M5fN1qU2Ozr21oF2pyawhYbTHj KgdrgtZjp8GN0hRtgeT5i/2JKdA/Xqj2RcqnXbmWcABCzvKJgestYl5HWYWNGDwzsycP mClP798ZU+c3dGCGL9RHLaQFMMPhp2X1jwmGSRERLlOrF2/RAFR+/bw2zk9Oxgu6bvSs Z9tCzNdW/bCOgYxT38FcZl84F6K7Ej080CohYOp7AuWPMJuq18zIMluGEgvFWc3hazkx K0UZiHKCOKdJbnsip6OcbgbygJ+5H3X/XpI2cima+i443f9D82WoPuX4gVIm+vlPAieR LJsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=aOPp1i7+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e123si2205179pgc.479.2019.06.28.07.22.58; Fri, 28 Jun 2019 07:23:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=aOPp1i7+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726719AbfF1OW4 (ORCPT + 99 others); Fri, 28 Jun 2019 10:22:56 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:41862 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbfF1OWz (ORCPT ); Fri, 28 Jun 2019 10:22:55 -0400 Received: by mail-qt1-f196.google.com with SMTP id d17so6439675qtj.8 for ; Fri, 28 Jun 2019 07:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WVmn8V88QNGADn+4BzJOKwnY0rFHsOXAlq7BOgZNCGc=; b=aOPp1i7+egoyuX5dPs0fEwpuD7ncaPsKMaTb1fJp8cn029yB84Cj38CXVf1K4HPO4m krk0DXWdBm48vEnib3lJ9PqOpql7Ei1s0A/1v8zu9VR0yqF2cFObMA+mxywr/6B3Rm2O tdSuJRsaGxJqDExu234qVW3Y/4KtiQ7+a+wY3I2ERadQD79lz8xKYQhi6xQ2Qsi5rNOJ qSQT3jk9apBhR+XgkF94YcowU2zU1m4lrnwKy4HXqzHIyEQo69uoV6QhrWXESQhqlaqZ EQlOfVcrLWqq5Q83LbfyVq7+xFnyE8uJBirXQHeY7ZfeByGsXRD9k0uf4i1lhCmNojoZ XkOA== 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:user-agent; bh=WVmn8V88QNGADn+4BzJOKwnY0rFHsOXAlq7BOgZNCGc=; b=X3r9bwXromYHvZKndY3qL0ALpDnyJOkJeYDog2OdDD8Gtrj+QW5/DkpSLGmi2c3/pm i+CeQefRCyLio2XD7pzX5FKEzbLuZqf+VbQnzsuBOhBmsHhzLX01S79R+j6l2tIoB0tk 2dBOR/Gc8EFYgVQDNAnAlsrdpPqRGuQ0ewne9gXtQ8h/G/tcio+Ha/HdOgtS9Zhou7J9 GZ7tZH+H/Zyl1O0jYLMB0uUoyaGoQS2qpQk5YKTfZqYZbERUd3S4HM7H5vu8WBkK4hlQ p54daJFT4ICwyME403WQm2gM61UDjJo9XwTOrT48w85hV7wpe/JYHDn66urkD2AaYG8z WXTA== X-Gm-Message-State: APjAAAU2mLz6U/uSBTQgq62Y/vAUQoujv9cz5tYRFkdd0f2wKY6cOCDJ DhL8DBHI/YnUAB7YdS92BioUYw== X-Received: by 2002:ac8:2ae8:: with SMTP id c37mr8359022qta.267.1561731774569; Fri, 28 Jun 2019 07:22:54 -0700 (PDT) Received: from localhost (pool-108-27-252-85.nycmny.fios.verizon.net. [108.27.252.85]) by smtp.gmail.com with ESMTPSA id x205sm1049020qka.56.2019.06.28.07.22.53 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 28 Jun 2019 07:22:53 -0700 (PDT) Date: Fri, 28 Jun 2019 10:22:52 -0400 From: Johannes Weiner To: Minchan Kim Cc: Kuo-Hsin Yang , Andrew Morton , Michal Hocko , Sonny Rao , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm: vmscan: fix not scanning anonymous pages when detecting file refaults Message-ID: <20190628142252.GA17212@cmpxchg.org> References: <20190619080835.GA68312@google.com> <20190627184123.GA11181@cmpxchg.org> <20190628065138.GA251482@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628065138.GA251482@google.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Minchan, On Fri, Jun 28, 2019 at 03:51:38PM +0900, Minchan Kim wrote: > On Thu, Jun 27, 2019 at 02:41:23PM -0400, Johannes Weiner wrote: > > On Wed, Jun 19, 2019 at 04:08:35PM +0800, Kuo-Hsin Yang wrote: > > > Fixes: 2a2e48854d70 ("mm: vmscan: fix IO/refault regression in cache workingset transition") > > > Signed-off-by: Kuo-Hsin Yang > > > > Acked-by: Johannes Weiner > > > > Your change makes sense - we should indeed not force cache trimming > > only while the page cache is experiencing refaults. > > > > I can't say I fully understand the changelog, though. The problem of > > I guess the point of the patch is "actual_reclaim" paramter made divergency > to balance file vs. anon LRU in get_scan_count. Thus, it ends up scanning > file LRU active/inactive list at file thrashing state. Look at the patch again. The parameter was only added to retain existing behavior. We *always* did file-only reclaim while thrashing - all the way back to the two commits I mentioned below. > So, Fixes: 2a2e48854d70 ("mm: vmscan: fix IO/refault regression in cache workingset transition") > would make sense to me since it introduces the parameter. What is the observable behavior problem that this patch introduced? > > forcing cache trimming while there is enough page cache is older than > > the commit you refer to. It could be argued that this commit is > > incomplete - it could have added refault detection not just to > > inactive:active file balancing, but also the file:anon balancing; but > > it didn't *cause* this problem. > > > > Shouldn't this be > > > > Fixes: e9868505987a ("mm,vmscan: only evict file pages when we have plenty") > > Fixes: 7c5bd705d8f9 ("mm: memcg: only evict file pages when we have plenty") > > That would affect, too but it would be trouble to have stable backport > since we don't have refault machinery in there. Hm? The problematic behavior is that we force-scan file while file is thrashing. We can obviously only solve this in kernels that can actually detect thrashing.