Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1829717ybi; Mon, 1 Jul 2019 00:59:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzblJ3U3psLrxUneGadJ8cdzQ4p06yVlNjRNkyAXaImfn7vpxy45Ci7mpsT8DUA+9gTbOTz X-Received: by 2002:a63:4c15:: with SMTP id z21mr22532084pga.87.1561967951074; Mon, 01 Jul 2019 00:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561967951; cv=none; d=google.com; s=arc-20160816; b=EkX28YTARBUaKqCipxdYFhizW/zKN4KtQoxbVXbfrknf3Y/8ki/GmTquf10krf2jhN bC2NJHv2h4Dkf57DyvmVouAiUhi45wGyzElZJurLYpnuYBLxNjw9Nz8Qhk6PkhYdFOvl AX38zmBGZe+0xFRnzfuKR67ceJcjneXrtOPCq1XTlHvx/kX0TxJsRqXte+vTXVv5Z2zZ EmQB+1OklF84DT1uSVa6cf/TQH97vaxQk6bhne1aGGkngMBnOdK/ub9Ch2OE+iQBtbCL c5LYN5HLZ5J28/1oS+IcDtM4T7HPR8LYMnCaOEfKh/PXgZq3H9PTWYXbgihg+yn5wpN6 pZ1A== 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=+twzjYVpRVjpacx4trZB94509DTZgYQcQMDYuMNcsR4=; b=LWVHbUr7F4DsfeYNOhxnJhNtEp2DUgDlxj3l8s2L6N+DgSS4XWUMmWfTm3ePThJOhm kY4mHz67QXdjRykApdmCUmT2RzcieWvwX9C1fwXD+kFKMqWI2b2KsDLY9ViDDgR/0m37 3G+5cGtEERcde81k0WuAX/Ocx08s/za5SjTo7ejcAfse2YLNjs59uX6HVNq/3iY+7Epg ea4N+KamruFWy4eJPCTwnfKuLnX6w7lQ+XEAHSQ3NheknmdVwigGSTlKNyD+XVMNlC22 rT0BYOxvwAvRll6n02R0SacvYDMpCdU2FEihRar94r+1aoqlT/mJ6qO8WEC/Y1huqYWh mCzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=NCUYHS0P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i186si6711538pge.9.2019.07.01.00.58.55; Mon, 01 Jul 2019 00:59:11 -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=@chromium.org header.s=google header.b=NCUYHS0P; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727581AbfGAH4j (ORCPT + 99 others); Mon, 1 Jul 2019 03:56:39 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43963 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726036AbfGAH4j (ORCPT ); Mon, 1 Jul 2019 03:56:39 -0400 Received: by mail-pl1-f193.google.com with SMTP id cl9so6892885plb.10 for ; Mon, 01 Jul 2019 00:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+twzjYVpRVjpacx4trZB94509DTZgYQcQMDYuMNcsR4=; b=NCUYHS0PUlBnq+9KUz6uY9duejMIwMu4rMg9X7onsD0fH/oIyThXHJHPrtnSc1V48K mwOXzdoJWMRsV/Nmapl5JdfEmmamY6OPDUoObkcs5JkIjL3NgtN2ASgrklfejqb7wpWm R/w9aVDSUub8VCFUBjyCa1wlgeejhnwrI+6NI= 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=+twzjYVpRVjpacx4trZB94509DTZgYQcQMDYuMNcsR4=; b=Z+A3/6/16T0e9/xIxssME8UuzUtxoesmjR02GO8qqITNlNErkmUIOVNmXQxxvQ3h5K w9DEEH0mo+GW8s1TGU6elwxRGfrnDVCjhakdBJzdCDWBbn/JeGRNZlYQEOMqYQFPJ2Pd +0XR/fPS7SPI5dE7uKIuMW9BhqpXLHSLfKkls5HKGg+Bvf1dTx/+08XeEavgdWer3n2w ABYt/frl/R54IS+cCYpVBORDUvyqFYF0sXDnoCLNUzYBe0pDNEFRYYrJhuDbN0hJyRJ5 lJa4f+AZiwsG/V01nfUSGoxYxBPvR6V9juAVp31llIFpNYVzYssHBe6l+Oaby2aDuKxb kP1Q== X-Gm-Message-State: APjAAAXOppBoSXEAVF7A8Go8GQw9oe7uNVm1O21yZOSrFTvSykrZipg1 eafqBh3Fzi8yWPofXRp2ebOY X-Received: by 2002:a17:902:968c:: with SMTP id n12mr28901036plp.59.1561967798535; Mon, 01 Jul 2019 00:56:38 -0700 (PDT) Received: from google.com ([2401:fa00:1:b:d89e:cfa6:3c8:e61b]) by smtp.gmail.com with ESMTPSA id m13sm8127237pgv.89.2019.07.01.00.56.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 01 Jul 2019 00:56:37 -0700 (PDT) Date: Mon, 1 Jul 2019 15:56:35 +0800 From: Kuo-Hsin Yang To: Johannes Weiner Cc: Andrew Morton , Minchan Kim , Michal Hocko , Sonny Rao , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2] mm: vmscan: fix not scanning anonymous pages when detecting file refaults Message-ID: <20190701075635.GA79748@google.com> References: <20190619080835.GA68312@google.com> <20190628111627.GA107040@google.com> <20190628143201.GB17212@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628143201.GB17212@cmpxchg.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 10:32:01AM -0400, Johannes Weiner wrote: > On Fri, Jun 28, 2019 at 07:16:27PM +0800, Kuo-Hsin Yang wrote: > > Commit 2a2e48854d70 ("mm: vmscan: fix IO/refault regression in cache > > workingset transition") introduced actual_reclaim parameter. When file > > refaults are detected, inactive_list_is_low() may return different > > values depends on the actual_reclaim parameter. Vmscan would only scan > > active/inactive file lists at file thrashing state when the following 2 > > conditions are satisfied. > > > > 1) inactive_list_is_low() returns false in get_scan_count() to trigger > > scanning file lists only. > > 2) inactive_list_is_low() returns true in shrink_list() to allow > > scanning active file list. > > > > This patch makes the return value of inactive_list_is_low() independent > > of actual_reclaim and rename the parameter back to trace. > > This is not. The root cause for the problem you describe isn't the > patch you point to. The root cause is our decision to force-scan the > file LRU based on relative inactive:active size alone, without taking > file thrashing into account at all. This is a much older problem. > > After the referenced patch, we're taking thrashing into account when > deciding whether to deactivate active file pages or not. To solve the > problem pointed out here, we can extend that same principle to the > decision whether to force-scan files and skip the anon LRUs. > > The patch you're pointing to isn't the culprit. On the contrary, it > provides the infrastructure to solve a much older problem. > > > Fixes: 2a2e48854d70 ("mm: vmscan: fix IO/refault regression in cache workingset transition") > > Please replace this line with the two Fixes: lines that I provided > earlier in this thread. Thanks for your clarification, I will update the changelog.