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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 63745C4363A for ; Thu, 29 Oct 2020 19:08:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B1A0220756 for ; Thu, 29 Oct 2020 19:08:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1A0220756 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A948A6B005C; Thu, 29 Oct 2020 15:08:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A43716B0062; Thu, 29 Oct 2020 15:08:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E51D6B0068; Thu, 29 Oct 2020 15:08:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id 5DB0B6B005C for ; Thu, 29 Oct 2020 15:08:10 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id EFA47181AEF15 for ; Thu, 29 Oct 2020 19:08:09 +0000 (UTC) X-FDA: 77425898298.20.rock62_270155e2728f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id C580C180C07AF for ; Thu, 29 Oct 2020 19:08:09 +0000 (UTC) X-HE-Tag: rock62_270155e2728f X-Filterd-Recvd-Size: 2521 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Thu, 29 Oct 2020 19:08:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C21A2AD31; Thu, 29 Oct 2020 19:08:07 +0000 (UTC) Date: Thu, 29 Oct 2020 20:08:04 +0100 From: osalvador To: Yang Shi Cc: Dave Hansen , Dave Hansen , Linux Kernel Mailing List , Linux MM , kbusch@kernel.org, "Verma, Vishal L" , Yang Shi , David Rientjes , Huang Ying , Dan Williams , David Hildenbrand Subject: Re: [RFC][PATCH 7/9] mm/vmscan: Consider anonymous pages without swap Message-ID: <20201029190804.GA4205@localhost.localdomain> References: <20201007161736.ACC6E387@viggo.jf.intel.com> <20201007161749.4C56D1F1@viggo.jf.intel.com> <20201029081454.GA30442@linux> <99dff0cd-2b1a-2c41-2596-eda7ecc7c160@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Oct 29, 2020 at 08:57:32AM -0700, Yang Shi wrote: > IMHO, we don't have to modify those two places at all. They are used > to rebalance the anon lru active/inactive ratio even if we did not try > to evict anon pages at all, so "total_swap_pages" is used instead of > checking swappiness and available swap space. > > The changes may result in imbalanced anon lru. I might be missing something, so bear with me. It is true that since we are only rebalancing the lists, we do not need to check for swap space yet, but here we are also adding a new end-point where we can migrate to in case of memory pressure. So in case we can demote pages, it makes sense to proceed with the aging and rebalancing regardless of whether we have swap in place, right? But maybe the right procedure would be to perform some sort of the following check in those two places: if (total_swap_pages || can_migrate_to_demote_node) - proceed_with_rebalancing_or_aging -- Oscar Salvador SUSE L3