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=unavailable 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 E2932C55178 for ; Thu, 29 Oct 2020 08:15:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 934F020720 for ; Thu, 29 Oct 2020 08:15:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728491AbgJ2IPJ (ORCPT ); Thu, 29 Oct 2020 04:15:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:60208 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727124AbgJ2IPE (ORCPT ); Thu, 29 Oct 2020 04:15:04 -0400 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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