Message ID | 20231220040037.883811-1-kinseyho@google.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-6341-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2403122dyi; Tue, 19 Dec 2023 20:01:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4Jp1vQx8LXK/Ns8QTbtWMvWGaeVhRkt7G3bU9RNewnNo+QPo4ffpXRY2/nhqDSxN2qT0F X-Received: by 2002:a05:6214:234c:b0:67f:33dd:633 with SMTP id hu12-20020a056214234c00b0067f33dd0633mr4530777qvb.9.1703044887478; Tue, 19 Dec 2023 20:01:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703044887; cv=none; d=google.com; s=arc-20160816; b=MO2J3mpWCh/To09YrSTTh4jHTVvHwCFuO/KGK0gMaTih+mwyXWUUOY+70b3IwrKmu0 n7C9vsMVYK/xLPdoUB2f1VtjeCZaxeSwYtlR+fJh+snSH6RnfjlOqztR3kJcCrVCXOXH h6+Iu3nHN5Z7rYFfiAh4REnu6X0nTHttGqpRQ3PRZjI+2lrBlDXigpg8nhEzJfS2euwL vOJIK2/HftLz6QYMyJ8xP2N7IJkfa/7SokN6Wcp14UUpUT309l8xBq5JLLQeUPiAkZ/+ ByeT8r8eSWFVRYtjehV5bTHh8U4NiyXbn/Jt9MqOrK5Y8vQXrmYoAf0RyOq2nevnhR7u OaOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=RfI9o+sdacyJamab4VjillVwnGfP6Fsc9NLEUsg0Lgg=; fh=n93v9KcAmhkcfuP6dxKLNNx5hJ2j6c63AMobvWHY+Kk=; b=Y7Kixh0ocC8b7ulYZwubHdrsW/tFUEILg8R3uzR4fp5Ln0ZjolDi0cwFHk2afyzBJc txeAvh9xjMeP0MOkFBiAdFf5jSLdXJsx6YgTrrZlSYDib0TV8Iqv/F9IUdCsluL4uhBO 7AgisU8RqHaGey/cZf09XxMawRxaVnuKQsduljB9ueGsBUMdAm+qV/9t71wkvqDtgwfW erh0TivQqDsBjJG2rbLc/8XhIeQgvvcbtFaI1ErBK3v2vAnu7Pw8U/n6WOoYcuNiw98L PpK+xThDrOyoloaTdcwYosuTOUiUcPyhfKs7+RgtX32UEL97liZUicDscF3HMM6gktgp Wk9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=JjnGVK7V; spf=pass (google.com: domain of linux-kernel+bounces-6341-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6341-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j10-20020a0cab8a000000b0067f69b6e7a3si1346491qvb.75.2023.12.19.20.01.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 20:01:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6341-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=JjnGVK7V; spf=pass (google.com: domain of linux-kernel+bounces-6341-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6341-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 44FFB1C2507F for <ouuuleilei@gmail.com>; Wed, 20 Dec 2023 04:01:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DD6011715; Wed, 20 Dec 2023 04:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JjnGVK7V" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E594ABE5E for <linux-kernel@vger.kernel.org>; Wed, 20 Dec 2023 04:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--kinseyho.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dbd9abdfaf6so413460276.2 for <linux-kernel@vger.kernel.org>; Tue, 19 Dec 2023 20:01:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703044863; x=1703649663; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=RfI9o+sdacyJamab4VjillVwnGfP6Fsc9NLEUsg0Lgg=; b=JjnGVK7VT8hVKI3X4A5AYRUn7/fLNA/2V5vERbyvTTYFjCLPwIHNaEw0sotD8g9IZJ moGvDCBJs1qKzzEPCWGLuSf3bf1+6vA3tYzFXZhqmyA2s0buAlJiZDJ94o/vvaDJoNjI Ax32abNkiDpl47oo6dPzldfN4ndZMUZmcumyj5I0voONcW6BTmO7VgZR1omUoGRGtHGl jsR5o0J7VRtm2QpqUhi1QU2QdcFf6LtfYm1YDtlj2S5VQmh3TB53DJ8HDVkJNRNMgcx5 YNdCECp/TPDEfBcvwL6Eh1kUnHR+0VYz2CzluXGH7zXhUKaqBgvdk0oSjX7QI39eps26 ON2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703044863; x=1703649663; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RfI9o+sdacyJamab4VjillVwnGfP6Fsc9NLEUsg0Lgg=; b=qYeKqX31E29Fq0p5dKBy+0eOLkliFIF7Aza1u87ZNYFLC/5xm7TFu8fzx+GUXdmqbo 4aIxRE0Md+Nb5GjTBF1HfWJ4uCLlSzmC+0IU7IQEExxUvJ4Zo4kpIoNcmaoa8r1jll9W nV94lw0FBecmvKXOLT9v4Oy8mJkGaun3nTFa7omhyxbD28bPLdcsPUG6JrliSZBJwSqA Lx8a+zBT5xrvfoNdsVBFJPOe3Q3oz8Oin/2UppgItRdmGy8UZSuHT9EDe09PYywWVepl wv2Ln7/hAonQrZxgrZIS4xb9VY2JVhfKJZP7sdIVvcEZU70DXvcRZ98sfqyLVTsI8vor vX0g== X-Gm-Message-State: AOJu0Yxo+7kRELkMQX47uRin1Aqiguy+sF27Cxj5FgG3N9phql5myArn nTVaH3qLrLIveWeSU4HkV+iJmuhcvScx7A== X-Received: from kinseyct.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:46b]) (user=kinseyho job=sendgmr) by 2002:a05:6902:343:b0:db5:f536:17d4 with SMTP id e3-20020a056902034300b00db5f53617d4mr2527722ybs.11.1703044862876; Tue, 19 Dec 2023 20:01:02 -0800 (PST) Date: Wed, 20 Dec 2023 04:00:33 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20231220040037.883811-1-kinseyho@google.com> Subject: [PATCH mm-unstable v3 0/4] mm/mglru: Kconfig cleanup From: Kinsey Ho <kinseyho@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, yuzhao@google.com, Kinsey Ho <kinseyho@google.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785771995933277233 X-GMAIL-MSGID: 1785771995933277233 |
Series | mm/mglru: Kconfig cleanup | |
Message
Kinsey Ho
Dec. 20, 2023, 4 a.m. UTC
This series is the result of the following discussion: https://lore.kernel.org/47066176-bd93-55dd-c2fa-002299d9e034@linux.ibm.com/ It mainly avoids building the code that walks page tables on CPUs that use it, i.e., those don't support hardware accessed bit. Specifically, it introduces a new Kconfig to guard some of functions added by commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks") on CPUs like POWER9, on which the series was tested. Kinsey Ho (4): mm/mglru: add CONFIG_ARCH_HAS_HW_PTE_YOUNG mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU mm/mglru: remove CONFIG_MEMCG mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE arch/Kconfig | 8 + arch/arm64/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/include/asm/pgtable.h | 6 - include/linux/memcontrol.h | 2 +- include/linux/mm_types.h | 16 +- include/linux/mmzone.h | 28 +--- include/linux/pgtable.h | 2 +- kernel/fork.c | 2 +- mm/Kconfig | 4 + mm/vmscan.c | 271 ++++++++++++++++++--------------- 11 files changed, 174 insertions(+), 167 deletions(-)
Comments
On Tue, Dec 19, 2023 at 9:01 PM Kinsey Ho <kinseyho@google.com> wrote: > > This series is the result of the following discussion: > https://lore.kernel.org/47066176-bd93-55dd-c2fa-002299d9e034@linux.ibm.com/ > > It mainly avoids building the code that walks page tables on CPUs that > use it, i.e., those don't support hardware accessed bit. Specifically, > it introduces a new Kconfig to guard some of functions added by > commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks") > on CPUs like POWER9, on which the series was tested. > > > Kinsey Ho (4): > mm/mglru: add CONFIG_ARCH_HAS_HW_PTE_YOUNG > mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU > mm/mglru: remove CONFIG_MEMCG > mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE > > arch/Kconfig | 8 + > arch/arm64/Kconfig | 1 + > arch/x86/Kconfig | 1 + > arch/x86/include/asm/pgtable.h | 6 - > include/linux/memcontrol.h | 2 +- > include/linux/mm_types.h | 16 +- > include/linux/mmzone.h | 28 +--- > include/linux/pgtable.h | 2 +- > kernel/fork.c | 2 +- > mm/Kconfig | 4 + > mm/vmscan.c | 271 ++++++++++++++++++--------------- > 11 files changed, 174 insertions(+), 167 deletions(-) +Donet Tom <donettom@linux.vnet.ibm.com> who is also working on this. Donet, could try this latest version instead? If it works well as the old one you've been using, can you please provide your Tested-by tag? Thanks.
On 12/20/23 09:46, Yu Zhao wrote: > On Tue, Dec 19, 2023 at 9:01 PM Kinsey Ho <kinseyho@google.com> wrote: >> This series is the result of the following discussion: >> https://lore.kernel.org/47066176-bd93-55dd-c2fa-002299d9e034@linux.ibm.com/ >> >> It mainly avoids building the code that walks page tables on CPUs that >> use it, i.e., those don't support hardware accessed bit. Specifically, >> it introduces a new Kconfig to guard some of functions added by >> commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks") >> on CPUs like POWER9, on which the series was tested. >> >> >> Kinsey Ho (4): >> mm/mglru: add CONFIG_ARCH_HAS_HW_PTE_YOUNG >> mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU >> mm/mglru: remove CONFIG_MEMCG >> mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE >> >> arch/Kconfig | 8 + >> arch/arm64/Kconfig | 1 + >> arch/x86/Kconfig | 1 + >> arch/x86/include/asm/pgtable.h | 6 - >> include/linux/memcontrol.h | 2 +- >> include/linux/mm_types.h | 16 +- >> include/linux/mmzone.h | 28 +--- >> include/linux/pgtable.h | 2 +- >> kernel/fork.c | 2 +- >> mm/Kconfig | 4 + >> mm/vmscan.c | 271 ++++++++++++++++++--------------- >> 11 files changed, 174 insertions(+), 167 deletions(-) > +Donet Tom <donettom@linux.vnet.ibm.com> > who is also working on this. > > Donet, could try this latest version instead? If it works well as the > old one you've been using, can you please provide your Tested-by tag? > Thanks. Hi Yu Zhao, This patch set looks promising. I have conducted tests on PowerPC and x86. In old patch set there is a cleanup patch which removes struct scan_control *sc argument from try_to_inc_max_seq() and run_aging(), Do we need to include that patch? =>Here are some test results from PowerPC. # ls -l vmscan.o -rw-r--r--. 1 root root 3600080 Dec 19 22:35 vmscan.o # size vmscan.o text data bss dec hex filename 95086 27412 0 122498 1de82 vmscan.o # ./scripts/bloat-o-meter vmscan.o.old vmscan.o add/remove: 4/8 grow/shrink: 7/9 up/down: 860/-2524 (-1664) Function old new delta should_abort_scan - 472 +472 inc_max_seq.isra 1472 1612 +140 shrink_one 680 760 +80 lru_gen_release_memcg 508 556 +48 lru_gen_init_pgdat 92 132 +40 shrink_node 4040 4064 +24 lru_gen_online_memcg 680 696 +16 lru_gen_change_state 3968 3984 +16 ------ shrink_lruvec 2168 2152 -16 lru_gen_seq_write 1980 1964 -16 isolate_folios 6904 6888 -16 lru_gen_init_memcg 32 12 -20 mm_list 24 - -24 lru_gen_exit_memcg 388 344 -44 try_to_shrink_lruvec 904 816 -88 lru_gen_rotate_memcg 832 700 -132 lru_gen_migrate_mm 132 - -132 lru_gen_seq_show 1484 1308 -176 iterate_mm_list_nowalk 288 - -288 lru_gen_look_around 2284 1984 -300 lru_gen_add_mm 528 - -528 lru_gen_del_mm 720 - -720 Total: Before=116213, After=114549, chg -1.43% =>Here are some test results from x86. $ ls -l vmscan.o -rw-r--r--. 1 donettom donettom 2545792 Dec 20 15:16 vmscan.o $ size vmscan.o text data bss dec hex filename 109751 32189 0 141940 22a74 vmscan.o $ $ ./scripts/bloat-o-meter vmscan.o.old vmscan.o add/remove: 7/3 grow/shrink: 14/4 up/down: 2307/-1534 (773) Function old new delta inc_max_seq - 1470 +1470 should_abort_scan - 229 +229 isolate_folios 4469 4562 +93 lru_gen_rotate_memcg 641 731 +90 lru_gen_init_memcg 41 99 +58 lru_gen_release_memcg 282 336 +54 lru_gen_exit_memcg 306 350 +44 walk_pud_range 2502 2543 +41 shrink_node 2912 2951 +39 lru_gen_online_memcg 402 434 +32 lru_gen_seq_show 1112 1140 +28 lru_gen_add_folio 740 757 +17 lru_gen_look_around 1217 1233 +16 __pfx_should_abort_scan - 16 +16 __pfx_inc_max_seq - 16 +16 iterate_mm_list_nowalk 277 292 +15 shrink_one 413 426 +13 lru_gen_init_lruvec 190 202 +12 ----- try_to_shrink_lruvec 717 643 -74 lru_gen_init_pgdat 196 82 -114 try_to_inc_max_seq.isra 2897 1578 -1319 Total: Before=101095, After=101868, chg +0.76% $ Tested-by: Donet Tom <donettom@linux.vnet.ibm.com> Thanks Donet Tom
On Wed, Dec 20, 2023 at 6:45 AM Donet Tom <donettom@linux.vnet.ibm.com> wrote: > > > On 12/20/23 09:46, Yu Zhao wrote: > > On Tue, Dec 19, 2023 at 9:01 PM Kinsey Ho <kinseyho@google.com> wrote: > >> This series is the result of the following discussion: > >> https://lore.kernel.org/47066176-bd93-55dd-c2fa-002299d9e034@linux.ibm.com/ > >> > >> It mainly avoids building the code that walks page tables on CPUs that > >> use it, i.e., those don't support hardware accessed bit. Specifically, > >> it introduces a new Kconfig to guard some of functions added by > >> commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks") > >> on CPUs like POWER9, on which the series was tested. > >> > >> > >> Kinsey Ho (4): > >> mm/mglru: add CONFIG_ARCH_HAS_HW_PTE_YOUNG > >> mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU > >> mm/mglru: remove CONFIG_MEMCG > >> mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE > >> > >> arch/Kconfig | 8 + > >> arch/arm64/Kconfig | 1 + > >> arch/x86/Kconfig | 1 + > >> arch/x86/include/asm/pgtable.h | 6 - > >> include/linux/memcontrol.h | 2 +- > >> include/linux/mm_types.h | 16 +- > >> include/linux/mmzone.h | 28 +--- > >> include/linux/pgtable.h | 2 +- > >> kernel/fork.c | 2 +- > >> mm/Kconfig | 4 + > >> mm/vmscan.c | 271 ++++++++++++++++++--------------- > >> 11 files changed, 174 insertions(+), 167 deletions(-) > > +Donet Tom <donettom@linux.vnet.ibm.com> > > who is also working on this. > > > > Donet, could try this latest version instead? If it works well as the > > old one you've been using, can you please provide your Tested-by tag? > > Thanks. > > Hi Yu Zhao, > > This patch set looks promising. > > I have conducted tests on PowerPC and x86. > > In old patch set there is a cleanup patch which removes > struct scan_control *sc argument from try_to_inc_max_seq() and > run_aging(), Do we need to include that patch? Sorry not for including that patch in this series. It's the first patch in the next cleanup series, which we haven't fully tested yet. It'll be the first order of business after the holiday season (mid Jan), does the schedule work for you? > =>Here are some test results from PowerPC. > > # ls -l vmscan.o > -rw-r--r--. 1 root root 3600080 Dec 19 22:35 vmscan.o > > # size vmscan.o > text data bss dec hex filename > 95086 27412 0 122498 1de82 vmscan.o > > # ./scripts/bloat-o-meter vmscan.o.old vmscan.o > add/remove: 4/8 grow/shrink: 7/9 up/down: 860/-2524 (-1664) > Function old new delta > should_abort_scan - 472 +472 > inc_max_seq.isra 1472 1612 +140 > shrink_one 680 760 +80 > lru_gen_release_memcg 508 556 +48 > lru_gen_init_pgdat 92 132 +40 > shrink_node 4040 4064 +24 > lru_gen_online_memcg 680 696 +16 > lru_gen_change_state 3968 3984 +16 > ------ > shrink_lruvec 2168 2152 -16 > lru_gen_seq_write 1980 1964 -16 > isolate_folios 6904 6888 -16 > lru_gen_init_memcg 32 12 -20 > mm_list 24 - -24 > lru_gen_exit_memcg 388 344 -44 > try_to_shrink_lruvec 904 816 -88 > lru_gen_rotate_memcg 832 700 -132 > lru_gen_migrate_mm 132 - -132 > lru_gen_seq_show 1484 1308 -176 > iterate_mm_list_nowalk 288 - -288 > lru_gen_look_around 2284 1984 -300 > lru_gen_add_mm 528 - -528 > lru_gen_del_mm 720 - -720 > Total: Before=116213, After=114549, chg -1.43% > > =>Here are some test results from x86. > > $ ls -l vmscan.o > -rw-r--r--. 1 donettom donettom 2545792 Dec 20 15:16 vmscan.o > > $ size vmscan.o > text data bss dec hex filename > 109751 32189 0 141940 22a74 vmscan.o > $ > > $ ./scripts/bloat-o-meter vmscan.o.old vmscan.o > add/remove: 7/3 grow/shrink: 14/4 up/down: 2307/-1534 (773) > Function old new delta > inc_max_seq - 1470 +1470 > should_abort_scan - 229 +229 > isolate_folios 4469 4562 +93 > lru_gen_rotate_memcg 641 731 +90 > lru_gen_init_memcg 41 99 +58 > lru_gen_release_memcg 282 336 +54 > lru_gen_exit_memcg 306 350 +44 > walk_pud_range 2502 2543 +41 > shrink_node 2912 2951 +39 > lru_gen_online_memcg 402 434 +32 > lru_gen_seq_show 1112 1140 +28 > lru_gen_add_folio 740 757 +17 > lru_gen_look_around 1217 1233 +16 > __pfx_should_abort_scan - 16 +16 > __pfx_inc_max_seq - 16 +16 > iterate_mm_list_nowalk 277 292 +15 > shrink_one 413 426 +13 > lru_gen_init_lruvec 190 202 +12 > ----- > try_to_shrink_lruvec 717 643 -74 > lru_gen_init_pgdat 196 82 -114 > try_to_inc_max_seq.isra 2897 1578 -1319 > Total: Before=101095, After=101868, chg +0.76% > $ > > > Tested-by: Donet Tom <donettom@linux.vnet.ibm.com> Thanks! Acked-by: Yu Zhao <yuzhao@google.com>
On 12/20/23 20:46, Yu Zhao wrote: > On Wed, Dec 20, 2023 at 6:45 AM Donet Tom <donettom@linux.vnet.ibm.com> wrote: >> >> On 12/20/23 09:46, Yu Zhao wrote: >>> On Tue, Dec 19, 2023 at 9:01 PM Kinsey Ho <kinseyho@google.com> wrote: >>>> This series is the result of the following discussion: >>>> https://lore.kernel.org/47066176-bd93-55dd-c2fa-002299d9e034@linux.ibm.com/ >>>> >>>> It mainly avoids building the code that walks page tables on CPUs that >>>> use it, i.e., those don't support hardware accessed bit. Specifically, >>>> it introduces a new Kconfig to guard some of functions added by >>>> commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks") >>>> on CPUs like POWER9, on which the series was tested. >>>> >>>> >>>> Kinsey Ho (4): >>>> mm/mglru: add CONFIG_ARCH_HAS_HW_PTE_YOUNG >>>> mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU >>>> mm/mglru: remove CONFIG_MEMCG >>>> mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE >>>> >>>> arch/Kconfig | 8 + >>>> arch/arm64/Kconfig | 1 + >>>> arch/x86/Kconfig | 1 + >>>> arch/x86/include/asm/pgtable.h | 6 - >>>> include/linux/memcontrol.h | 2 +- >>>> include/linux/mm_types.h | 16 +- >>>> include/linux/mmzone.h | 28 +--- >>>> include/linux/pgtable.h | 2 +- >>>> kernel/fork.c | 2 +- >>>> mm/Kconfig | 4 + >>>> mm/vmscan.c | 271 ++++++++++++++++++--------------- >>>> 11 files changed, 174 insertions(+), 167 deletions(-) >>> +Donet Tom <donettom@linux.vnet.ibm.com> >>> who is also working on this. >>> >>> Donet, could try this latest version instead? If it works well as the >>> old one you've been using, can you please provide your Tested-by tag? >>> Thanks. >> Hi Yu Zhao, >> >> This patch set looks promising. >> >> I have conducted tests on PowerPC and x86. >> >> In old patch set there is a cleanup patch which removes >> struct scan_control *sc argument from try_to_inc_max_seq() and >> run_aging(), Do we need to include that patch? > Sorry not for including that patch in this series. > > It's the first patch in the next cleanup series, which we haven't > fully tested yet. It'll be the first order of business after the > holiday season (mid Jan), does the schedule work for you? > Yes. No Problem. Thank you very much. Donet Tom >> =>Here are some test results from PowerPC. >> >> # ls -l vmscan.o >> -rw-r--r--. 1 root root 3600080 Dec 19 22:35 vmscan.o >> >> # size vmscan.o >> text data bss dec hex filename >> 95086 27412 0 122498 1de82 vmscan.o >> >> # ./scripts/bloat-o-meter vmscan.o.old vmscan.o >> add/remove: 4/8 grow/shrink: 7/9 up/down: 860/-2524 (-1664) >> Function old new delta >> should_abort_scan - 472 +472 >> inc_max_seq.isra 1472 1612 +140 >> shrink_one 680 760 +80 >> lru_gen_release_memcg 508 556 +48 >> lru_gen_init_pgdat 92 132 +40 >> shrink_node 4040 4064 +24 >> lru_gen_online_memcg 680 696 +16 >> lru_gen_change_state 3968 3984 +16 >> ------ >> shrink_lruvec 2168 2152 -16 >> lru_gen_seq_write 1980 1964 -16 >> isolate_folios 6904 6888 -16 >> lru_gen_init_memcg 32 12 -20 >> mm_list 24 - -24 >> lru_gen_exit_memcg 388 344 -44 >> try_to_shrink_lruvec 904 816 -88 >> lru_gen_rotate_memcg 832 700 -132 >> lru_gen_migrate_mm 132 - -132 >> lru_gen_seq_show 1484 1308 -176 >> iterate_mm_list_nowalk 288 - -288 >> lru_gen_look_around 2284 1984 -300 >> lru_gen_add_mm 528 - -528 >> lru_gen_del_mm 720 - -720 >> Total: Before=116213, After=114549, chg -1.43% >> >> =>Here are some test results from x86. >> >> $ ls -l vmscan.o >> -rw-r--r--. 1 donettom donettom 2545792 Dec 20 15:16 vmscan.o >> >> $ size vmscan.o >> text data bss dec hex filename >> 109751 32189 0 141940 22a74 vmscan.o >> $ >> >> $ ./scripts/bloat-o-meter vmscan.o.old vmscan.o >> add/remove: 7/3 grow/shrink: 14/4 up/down: 2307/-1534 (773) >> Function old new delta >> inc_max_seq - 1470 +1470 >> should_abort_scan - 229 +229 >> isolate_folios 4469 4562 +93 >> lru_gen_rotate_memcg 641 731 +90 >> lru_gen_init_memcg 41 99 +58 >> lru_gen_release_memcg 282 336 +54 >> lru_gen_exit_memcg 306 350 +44 >> walk_pud_range 2502 2543 +41 >> shrink_node 2912 2951 +39 >> lru_gen_online_memcg 402 434 +32 >> lru_gen_seq_show 1112 1140 +28 >> lru_gen_add_folio 740 757 +17 >> lru_gen_look_around 1217 1233 +16 >> __pfx_should_abort_scan - 16 +16 >> __pfx_inc_max_seq - 16 +16 >> iterate_mm_list_nowalk 277 292 +15 >> shrink_one 413 426 +13 >> lru_gen_init_lruvec 190 202 +12 >> ----- >> try_to_shrink_lruvec 717 643 -74 >> lru_gen_init_pgdat 196 82 -114 >> try_to_inc_max_seq.isra 2897 1578 -1319 >> Total: Before=101095, After=101868, chg +0.76% >> $ >> >> >> Tested-by: Donet Tom <donettom@linux.vnet.ibm.com> > Thanks! > > Acked-by: Yu Zhao <yuzhao@google.com>