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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 5C006C55179 for ; Thu, 29 Oct 2020 19:31:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C63BE207DE for ; Thu, 29 Oct 2020 19:31:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="glBEJM+f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C63BE207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 06CBD6B005C; Thu, 29 Oct 2020 15:31:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 041D36B0062; Thu, 29 Oct 2020 15:31:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC2C76B0068; Thu, 29 Oct 2020 15:31:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id BFC846B005C for ; Thu, 29 Oct 2020 15:31:05 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5BB4C3624 for ; Thu, 29 Oct 2020 19:31:05 +0000 (UTC) X-FDA: 77425956090.05.event74_4e161a52728f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 3BE5418027493 for ; Thu, 29 Oct 2020 19:31:05 +0000 (UTC) X-HE-Tag: event74_4e161a52728f X-Filterd-Recvd-Size: 4384 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Thu, 29 Oct 2020 19:31:04 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id x1so4271153eds.1 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=YIFzjdVXJ3Uwljh97G81RAcF6NZ/M+Y2GdYzIRW4eaVaZtjhfWctB07vkSMV+/D6t6 g5LpiElW6Ne5MC14hU+wV9aZjjrrgAR5qsy1FBbJ38JcrRoLBikSe1qp7lEeCeBy9zil qU4rP111kwytiqNCyxqlT2X79l7P3YzcptvY8UH8ftCVqgqM2sjaE/ciyfGaKfNspAVD jeU5du0XdZcc2TdkP/PcB+phLredSHclInZyklv9FygNqY9tc4N1mlgSOWbt8JsDjKHh u11+FT3XWkyv27Xgrrd0bXeW6jqfKrOUKv7gSRHyp1ms24+5SDvQahX+GctobDLWPuf4 63Rw== X-Gm-Message-State: AOAM5300UfUYl446Mkm5QLp//PIgN7H2s/HG/99IP9C2n/kVEjzmKs4/ OoSrSUuBwkPTle05+0QhdMi2kJ3OJVm66aH4cj0= X-Google-Smtp-Source: ABdhPJwXoFbywY8gxuGz4icKbLF1mbamWY0Fv4e+d+QSffi2fe03Epf8ca0A1gr4qjWb7HTpHAE7jAHpsVr54zWvlRE= 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" 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 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