Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp711235pxx; Thu, 29 Oct 2020 12:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3GCyQ9G0r8Flbgy+eklML1g44qxgJg0XoLCbsARPOSeFqWBNItuOnUNznsxe13BvMmZZl X-Received: by 2002:a05:6402:cf:: with SMTP id i15mr5916110edu.246.1603999974450; Thu, 29 Oct 2020 12:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603999974; cv=none; d=google.com; s=arc-20160816; b=XgAHUch7Yo1ZOyn7AJX7QHjRBWsJoDR41pugceZcZWDzLKkYrMcdgTEDzHHlGWSja7 3hNHcds/kA4AuHngKhwoBWVaJYlnVYCe8NTuCLZiJTi7CQ6bTFbQZEunr33UocjleoxD PqJmllzTl15FbcXfrdY3C6a+qdT9MA/vUkrGB+mE/nDppwKitSbrH4j8v6w/GWvmtHVP a6sj0uxvx/pdejF4s5yOcAm91cPmbe7EkoTq53B9j85VGSGvqEmvXrYQwLihH04sHXhV ZpHYy/sQyqh+fDSfNN95+CqkgudRmc4LnfEmcs5oEFFH6ZTzwpMZ6W8JAezNkySvir4y /LRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HyJygmAvNgYlCXg5FRM2hRgcjUEjJ9Xaju1Fs9LLpuU=; b=W8HB62afRYEEj4VWqAQmAYkTxbTWJEd/KabW2n4rRyIe40m7MAhou8BqTMmf4481RL fq4k7Wh0xgCz99XMPao92r6jpp4CUqvy3Xa42hYsy03dgxe88IIA7asD/XzRQPyPF00y xF44bx/+bzZHplgxX3zIr6UfuakLn1DbrqX7vKgonDtpDi1OmNymQhcBUr7ASPXjVAfg tLGCtHCsfHNWnSzTSCjo09RsVQstiPE1dokxl8KybbYsubSZx28YdkfqmSQ3c671Sw2c W33dvDfSpIRAwVFcAsGp08zWm6ILp5hPsqWN6ZwiNA19lCl4/4b9Vb+lVDeYovweU0Fd GLKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=glBEJM+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf20si2609926ejb.332.2020.10.29.12.32.31; Thu, 29 Oct 2020 12:32:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=glBEJM+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726214AbgJ2TbF (ORCPT + 99 others); Thu, 29 Oct 2020 15:31:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgJ2TbF (ORCPT ); Thu, 29 Oct 2020 15:31:05 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF7CDC0613CF for ; Thu, 29 Oct 2020 12:31:04 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id k9so4250637edo.5 for ; Thu, 29 Oct 2020 12:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HyJygmAvNgYlCXg5FRM2hRgcjUEjJ9Xaju1Fs9LLpuU=; b=glBEJM+fqw6vvS11sAi4ED/GhnYv6vtIMwfqmGflxe+RAcGJCMyOC1To9OOgz3UJQQ vUYC+iaxxWuX5oE3VGCXqfcWsvCoUNdYl+m8Djyovzn0oJJhfgrjlUxAhMThkJuqYPBn phz910BKRi74+YHn+2giV/C552vY9iNPMAnAvTkDabcmsIdyIQ/VHB8TXAvLvSOmU4xP zHorz1AFdc2ngNlieyqSx90h+n72eSKgC8pTwMOzn2iVeexPoJBEYuyrx4Aua6BfjoHV w4/2z45Qi+bGy7rA1s/3NUJNnbo1NMi9j0uYa+UrmK83n8Qpn5YZMlS58Ynld5HhQgF8 EDzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HyJygmAvNgYlCXg5FRM2hRgcjUEjJ9Xaju1Fs9LLpuU=; b=oM5mYlZF8XCiSgudrG1mrNJG3kGX7dKsdVCpNeoUJYq62yQ1FdEDkdb4qgyzLFGnJd cE6ef3AxguUtDmmtE0cqYlbar+4vO33Rksyc688tdanxGtOH8USVpcbg6ZU71mjaSZwW zAOiRzzaAeK+SzG7er8a4Op/xYd5O0JuBCv0gbWDeIHCT8znniEh/zoQ81w1qAyHImjg y67s2JcKp/TBvsl2umD634bUGR93A2Lln2nyBRGcOw2KXKzOMNJwtadNSxRAQWA9FsvC ZDNG1JH3FUk08ENKX0nXSREznte3HvwvMEusyFHTmmc1d/6ZdA7fFbRKUYh1uz6K50YB 4Hgg== X-Gm-Message-State: AOAM532LAFXnyVBXBvIUf5sVPymzbasTwmAKBtJMfDgfFg5IRtTjm3h4 MqwWjJvz6PZggnt5G5xBb2sOLRJrPiiYUvLKxKc= X-Received: by 2002:aa7:cd42:: with SMTP id v2mr5598142edw.151.1603999863626; Thu, 29 Oct 2020 12:31:03 -0700 (PDT) MIME-Version: 1.0 References: <20201007161736.ACC6E387@viggo.jf.intel.com> <20201007161749.4C56D1F1@viggo.jf.intel.com> <20201029081454.GA30442@linux> <99dff0cd-2b1a-2c41-2596-eda7ecc7c160@intel.com> <20201029190804.GA4205@localhost.localdomain> In-Reply-To: <20201029190804.GA4205@localhost.localdomain> From: Yang Shi Date: Thu, 29 Oct 2020 12:30:51 -0700 Message-ID: Subject: Re: [RFC][PATCH 7/9] mm/vmscan: Consider anonymous pages without swap To: osalvador 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 29, 2020 at 12:08 PM osalvador wrote: > > 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? Yes, makes sense. I missed that point. > > 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 Looks sane to me. > > -- > Oscar Salvador > SUSE L3