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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D2EEC433F5 for ; Thu, 14 Apr 2022 20:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Z6DlafERtcZKzQ/2DyZmy2fNvnpFw2DisUZb98YzqtI=; b=ONF+N6yqzldeST An4oX+mNFC9wHQf6l8bh7uCXcg11+AHFu1RfYbEjDjC+Px8JU16YsuFgvBJXG4ICSFLQ+GAA200Kl OeVla0knVu7jkH53C2z6bAPUGoo4WQgZVYlY8rhioHBnJH+CkgfJNsJwVsHaA2Nya+uOP5kgi61zP GNX4+aY8H1D+zYIK1NZTjTfbGEoLhrvrIk/e2Z6v7DTeHJY1VZTkx3Bw3ZwCV36lhWpk+Q04qlTFM 6HlUEYthYc8m/GLx1eaupRT0nJ/FJJ81n9fd8OH1I534BsZ48qsSFOZzPJgHrmW1zHA7wy76o59xs NRWjbtT8bO7Rk6N/pOpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf6CL-007DZP-Oe; Thu, 14 Apr 2022 20:36:13 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf6CJ-007DYb-BA for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2022 20:36:12 +0000 Received: by mail-io1-xd36.google.com with SMTP id 125so6634187iov.10 for ; Thu, 14 Apr 2022 13:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VOwb/LIajkynds1NOWj0jp1Wh/dVLVu/LuQcUbDz8pc=; b=Fl/3pmZMMXpOUXW9mpvpX/dnQQ8iA+BLm4Msn7syrUbuGNt6ScyDa/OeLqypvbAZD3 mn/YqmGq1kRjD8kCuAkSd7Rl/xsRv9+bu/uYkJZYO6ztOmnXAmlF/Um+oHvfq8CBWlG8 nmo2fZO/3i/n8sBlau9jKc8ktVdxUIL6KfVQt1UTGh6oKY3BuxQRcBomVOMM5T+JSRpZ G0XFcWIeCNOiY9mH6ebjC64b+MRHtWCr1HGLIEb9kbrQnYiAAybYpZVzGbnl8gaqCwCk 4N7JMm/Zuv+rdDf+LtmAAt0BOUCUoOUGMh0tFQTPiieWZn2K8CxtWysktqjJtG83yiFW kv1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VOwb/LIajkynds1NOWj0jp1Wh/dVLVu/LuQcUbDz8pc=; b=YqCG9LgFntKYPQE+1IzeekAm+DeXGyjoKfXNYsBUyzaHV+s6LZ2fQOhBY1w/D7A1sm xAPXJTPFAZ9Dtp7CuWjyDfKmZKwh4IMWjdeWvJ8CWZYuXASLHc6qqK0ECAi6RASKtF2H y9i6+4a/abbrIt6w0WHCG7qKeMvWbPq+6Igl4fRscHPsg+P85iCNR9V3zxbNzhpok6j3 ykA1zAWZ3lM3Djxvr8sEj49AbZBCUt8fCFjCT+M1KCRnWNXqRvZij5g3B3WjcX5ywFsp vjuD9MJuzgVL40IgzwfOb4O/T4v90B32YX/f/Cft6z9uEIzh4MLRxS82KMeCDGtzZuF1 5c3w== X-Gm-Message-State: AOAM532FfiBOPNWN7SeoA6lEtdXxOK3K/yyAAI/aQmM8noeIRyCVCuPK 7ut2/XO7n+3XFxpLB0W5uNMisg== X-Google-Smtp-Source: ABdhPJzV9I/1jO0ij8KF1ngerhZUW0uge9IpUFXv4nROGyQiw1Pt6a1Zao6nhgJZ9LT4b07U+qKwrA== X-Received: by 2002:a05:6602:2f0a:b0:64f:99ed:d732 with SMTP id q10-20020a0566022f0a00b0064f99edd732mr1851747iow.150.1649968569030; Thu, 14 Apr 2022 13:36:09 -0700 (PDT) Received: from google.com ([2620:15c:183:200:e02:decc:64d3:b1d3]) by smtp.gmail.com with ESMTPSA id h7-20020a056e021d8700b002ca753db1c9sm1660605ila.77.2022.04.14.13.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 13:36:08 -0700 (PDT) Date: Thu, 14 Apr 2022 14:36:03 -0600 From: Yu Zhao To: Barry Song <21cnbao@gmail.com> Cc: Stephen Rothwell , Linux-MM , Andi Kleen , Andrew Morton , Aneesh Kumar , Catalin Marinas , Dave Hansen , Hillf Danton , Jens Axboe , Jesse Barnes , Johannes Weiner , Jonathan Corbet , Linus Torvalds , Matthew Wilcox , Mel Gorman , Michael Larabel , Michal Hocko , Mike Rapoport , Rik van Riel , Vlastimil Babka , Will Deacon , Ying Huang , LAK , Linux Doc Mailing List , LKML , Kernel Page Reclaim v2 , x86 , Brian Geffon , Jan Alexander Steffens , Oleksandr Natalenko , Steven Barrett , Suleiman Souhlal , Daniel Byrne , Donald Carr , Holger =?iso-8859-1?Q?Hoffst=E4tte?= , Konstantin Kharlamov , Shuang Zhai , Sofia Trinh , Vaibhav Jain Subject: Re: [PATCH v10 06/14] mm: multi-gen LRU: minimal implementation Message-ID: References: <20220407031525.2368067-1-yuzhao@google.com> <20220407031525.2368067-7-yuzhao@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_133611_442142_23DA09E6 X-CRM114-Status: GOOD ( 23.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 14, 2022 at 06:03:10PM +1200, Barry Song wrote: > > On Thu, Apr 7, 2022 at 3:16 PM Yu Zhao wrote: > > > > + > > +static int isolate_folios(struct lruvec *lruvec, struct scan_control *sc, int swappiness, > > + int *type_scanned, struct list_head *list) > > +{ > > + int i; > > + int type; > > + int scanned; > > + int tier = -1; > > + DEFINE_MIN_SEQ(lruvec); > > + > > + VM_BUG_ON(!seq_is_valid(lruvec)); > > + > > + /* > > + * Try to make the obvious choice first. When anon and file are both > > + * available from the same generation, interpret swappiness 1 as file > > + * first and 200 as anon first. > > + */ > > Has this changed the ABI of swapiness? No. > or it is only something > meaningful for the internal code? This is how swappiness is interpreted. > if so, can we rename it to > something else? otherwise, it is quite confusing. Feel free to suggest something. > it seems 1 is set internally as a magic number here: > +static void lru_gen_shrink_lruvec(struct lruvec *lruvec, struct > scan_control *sc) > +{ > + ... > + else if (!cgroup_reclaim(sc) && get_swappiness(lruvec, sc)) > + swappiness = 1; > + else > + swappiness = 0; > + } > obviously this swappiness is neither /proc/sys/vm/swappiness nor > /sys/fs/cgroup/memory//>memory.swappiness, right? Right. > > @@ -3928,6 +4726,11 @@ static void age_active_anon(struct pglist_data *pgdat, > > struct mem_cgroup *memcg; > > struct lruvec *lruvec; > > > > + if (lru_gen_enabled()) { > > + lru_gen_age_node(pgdat, sc); > > + return; > > + } > > is it really a good place for lru_gen_age_node() since the function > is named age_active_anon() > but here you are doing aging for both anon and file pages? Yes. > obviously > lru_gen_age_node() is not > doing "age active anon". We can rename it if you have something in mind. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel