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=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 EBF9EC55179 for ; Thu, 29 Oct 2020 08:15:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 571672071A for ; Thu, 29 Oct 2020 08:15:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 571672071A 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 8B5EF6B0073; Thu, 29 Oct 2020 04:15:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83F5C6B0074; Thu, 29 Oct 2020 04:15:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 706886B0075; Thu, 29 Oct 2020 04:15:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id 39ACA6B0073 for ; Thu, 29 Oct 2020 04:15:05 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id C10D41EE6 for ; Thu, 29 Oct 2020 08:15:04 +0000 (UTC) X-FDA: 77424252528.07.dress97_34056eb2728b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id A665F1803FF02 for ; Thu, 29 Oct 2020 08:15:04 +0000 (UTC) X-HE-Tag: dress97_34056eb2728b X-Filterd-Recvd-Size: 2492 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Thu, 29 Oct 2020 08:15:04 +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 CC305ABF5; Thu, 29 Oct 2020 08:15:02 +0000 (UTC) Date: Thu, 29 Oct 2020 09:14:59 +0100 From: Oscar Salvador To: Dave Hansen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kbusch@kernel.org, vishal.l.verma@intel.com, yang.shi@linux.alibaba.com, rientjes@google.com, ying.huang@intel.com, dan.j.williams@intel.com, david@redhat.com Subject: Re: [RFC][PATCH 7/9] mm/vmscan: Consider anonymous pages without swap Message-ID: <20201029081454.GA30442@linux> References: <20201007161736.ACC6E387@viggo.jf.intel.com> <20201007161749.4C56D1F1@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007161749.4C56D1F1@viggo.jf.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Wed, Oct 07, 2020 at 09:17:49AM -0700, Dave Hansen wrote: > > From: Keith Busch > > Age and reclaim anonymous pages if a migration path is available. The > node has other recourses for inactive anonymous pages beyond swap, > > #Signed-off-by: Keith Busch > Cc: Keith Busch > [vishal: fixup the migration->demotion rename] > Signed-off-by: Vishal Verma > Signed-off-by: Dave Hansen > Cc: Yang Shi > Cc: David Rientjes > Cc: Huang Ying > Cc: Dan Williams > Cc: David Hildenbrand I have a question regarding this one. It seems that we do have places where we read total_swap_pages directly and other places where we use get_nr_swap_pages. One seems to give the total number of swap pages, while the other gives the number of free swap pages. With this patch, we will use always the atomic version get_nr_swap_pages from now on. Is that ok? I guess so, but it might warrant a mention in the changelog? E.g: age_active_anon seems to base one of its decisions on whether we have swap (it seems it does not care if swap space is available). -- Oscar Salvador SUSE L3