From nobody Fri Nov 29 03:38:21 2024 Received: from mail-vs1-f74.google.com (mail-vs1-f74.google.com [209.85.217.74]) (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 97C991AC88E for ; Thu, 26 Sep 2024 01:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727314539; cv=none; b=QLezvC7ZuksciJS5mHl88JUQYqvmGD2OFuMTeVp7yvC0OOhkJ0l4B+pLRrOcIHS/mb5RQhJ5Sh4GMaXdhpaelfNP98FfBq/dDCqrZuHPSQ5BLxMLSD93r6FnPJ1iXyahh2eGs+/vawvhCpsQmp8EgJ9JQ5jhOXGUuuoRSZsR7Fg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727314539; c=relaxed/simple; bh=3z196vrc/7EnpS5uiU8pv6T9dS6BXm+Q9maqS8EiBdY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=FaR5iQWR1bkoug4jguovY3gGMcUaJGvH3gwzjLP9uFs+XSrbG3FR6c65X+5KQUWsuIbfWuyZonaTu4kuwWXnJB24E0lP5GOgn4zPdNlqG9lSjYwYkV5hFCVFxvz+TPtMPQtRklJ4tUmoly0wz/lN49ZIZkqX6aQcB+ThBtjqP/I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jthoughton.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=elxGYgQc; arc=none smtp.client-ip=209.85.217.74 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--jthoughton.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="elxGYgQc" Received: by mail-vs1-f74.google.com with SMTP id ada2fe7eead31-49bc7d7b31fso191944137.1 for ; Wed, 25 Sep 2024 18:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1727314536; x=1727919336; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=MWj+EtmYN6BoWav4C6XYFCP/YJSRpIEJzj9cj+E6cQI=; b=elxGYgQce8WduOX//vnq2j+DAh6vsg0p8094Crk013athi1Kpiw3LuT/nmFInIPCki MAubiI2+M/cSOc9mORkX7apBDGSGLKGO5sRwkDRSExpsarAvgVtVNWDT0f8mCqi0DysL wYhAlN21qJE65gQRDcEvfPzemX5CwsOUovpJ8YCaKozC+zGVRQnndvuqNquwCqXYxpSu pCWmJ0qlvkOv3toTQo52WfsJX93ztcUfZKQS8szkXse0HHen5uBVD+OrOQYy6gY9GaSO bI5fvazPI0MFilQPQOXaD1NvSeALYbEwmtDMTuZ3r4/Kne3mrQi2adw67HiwGdgpGWkX mzGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727314536; x=1727919336; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MWj+EtmYN6BoWav4C6XYFCP/YJSRpIEJzj9cj+E6cQI=; b=t1N8cRPdIZ1nmKJtQpER7PQanrFYzU4hwKlONn+a0so2riC6WgHv7KA4cAD1IESz7N EzoVHNrs4TwVni3QIHPnNmyIik6debG9fjdFicwtTgwrRMlaxsH0GoTXvoYkI9Zah1GO S5LH0OVnxs6Ygosd/pbr+1Rk2raCK43H8G+BY3Tp2Ne7sY43S8SlaF2dV8iWWw27YgJi fxQrJc3AO8KrhPt0Wn/7B3WzfZ326JridS36b1IxxaDVXcS4/BsJNJjo9O9+TOSd+PhU //XIO1GaDCWnK+V5jERL5KJERWL90SLWBtt37QdEmLUSTRGSC+2KZYTU3SCn9AfMj47K 0ycQ== X-Forwarded-Encrypted: i=1; AJvYcCUD5k4++x9t5cRQ9pe+ymWTCyJ0kyCY411b1matCdhGOUEy65Kt87z9x4K9R5GAOS3IAvH+j4n7F6TadLQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwZToOzebU9gMmCooZ4D6yNkNtTK5g1ArzVs10ySbBehaE5NU/t Xwyvv7iGwTnBGgoSBS6yGeadz2/je6Tw2xQ5/jloBfGFLxsfIF8UqYgDSMnX1QsxmpG/6Weo607 fwtsT++vqleJTq6MeVQ== X-Google-Smtp-Source: AGHT+IEWbFq5+mKO2q49QysNNPvZDCXSWbklfJ2UiM9KvwQART8aUu+/JLlyrv3E0SSfh27Nwb4MbN5v9Rl58JjT X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:13d:fb22:ac12:a84b]) (user=jthoughton job=sendgmr) by 2002:a05:6102:5e97:b0:48d:9c9b:f391 with SMTP id ada2fe7eead31-4a15dd4beb2mr104946137.5.1727314536465; Wed, 25 Sep 2024 18:35:36 -0700 (PDT) Date: Thu, 26 Sep 2024 01:35:05 +0000 In-Reply-To: <20240926013506.860253-1-jthoughton@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240926013506.860253-1-jthoughton@google.com> X-Mailer: git-send-email 2.46.0.792.g87dc391469-goog Message-ID: <20240926013506.860253-18-jthoughton@google.com> Subject: [PATCH v7 17/18] mm: multi-gen LRU: Have secondary MMUs participate in aging From: James Houghton To: Sean Christopherson , Paolo Bonzini Cc: Andrew Morton , David Matlack , David Rientjes , James Houghton , Jason Gunthorpe , Jonathan Corbet , Marc Zyngier , Oliver Upton , Wei Xu , Yu Zhao , Axel Rasmussen , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Secondary MMUs are currently consulted for access/age information at eviction time, but before then, we don't get accurate age information. That is, pages that are mostly accessed through a secondary MMU (like guest memory, used by KVM) will always just proceed down to the oldest generation, and then at eviction time, if KVM reports the page to be young, the page will be activated/promoted back to the youngest generation. The added feature bit (0x8), if disabled, will make MGLRU behave as if there are no secondary MMUs subscribed to MMU notifiers except at eviction time. Implement aging with the new mmu_notifier_clear_young_fast_only() notifier. For architectures that do not support this notifier, this becomes a no-op. For architectures that do implement it, it should be fast enough to make aging worth it (usually the case if the notifier is implemented locklessly). Suggested-by: Yu Zhao Signed-off-by: James Houghton --- Documentation/admin-guide/mm/multigen_lru.rst | 6 +- include/linux/mmzone.h | 6 +- mm/rmap.c | 9 +- mm/vmscan.c | 148 ++++++++++++++---- 4 files changed, 127 insertions(+), 42 deletions(-) diff --git a/Documentation/admin-guide/mm/multigen_lru.rst b/Documentation/= admin-guide/mm/multigen_lru.rst index 33e068830497..e1862407652c 100644 --- a/Documentation/admin-guide/mm/multigen_lru.rst +++ b/Documentation/admin-guide/mm/multigen_lru.rst @@ -48,6 +48,10 @@ Values Components verified on x86 varieties other than Intel and AMD. If it is disabled, the multi-gen LRU will suffer a negligible performance degradation. +0x0008 Clear the accessed bit in secondary MMU page tables when aging + instead of waiting until eviction time. This results in accurate + page age information for pages that are mainly used by a + secondary MMU. [yYnN] Apply to all the components above. =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 @@ -56,7 +60,7 @@ E.g., =20 echo y >/sys/kernel/mm/lru_gen/enabled cat /sys/kernel/mm/lru_gen/enabled - 0x0007 + 0x000f echo 5 >/sys/kernel/mm/lru_gen/enabled cat /sys/kernel/mm/lru_gen/enabled 0x0005 diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 1dc6248feb83..dbfb868c3708 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -400,6 +400,7 @@ enum { LRU_GEN_CORE, LRU_GEN_MM_WALK, LRU_GEN_NONLEAF_YOUNG, + LRU_GEN_SECONDARY_MMU_WALK, NR_LRU_GEN_CAPS }; =20 @@ -557,7 +558,7 @@ struct lru_gen_memcg { =20 void lru_gen_init_pgdat(struct pglist_data *pgdat); void lru_gen_init_lruvec(struct lruvec *lruvec); -void lru_gen_look_around(struct page_vma_mapped_walk *pvmw); +bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw); =20 void lru_gen_init_memcg(struct mem_cgroup *memcg); void lru_gen_exit_memcg(struct mem_cgroup *memcg); @@ -576,8 +577,9 @@ static inline void lru_gen_init_lruvec(struct lruvec *l= ruvec) { } =20 -static inline void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +static inline bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw) { + return false; } =20 static inline void lru_gen_init_memcg(struct mem_cgroup *memcg) diff --git a/mm/rmap.c b/mm/rmap.c index 2490e727e2dc..51bbda3bae60 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -870,13 +870,10 @@ static bool folio_referenced_one(struct folio *folio, continue; } =20 - if (pvmw.pte) { - if (lru_gen_enabled() && - pte_young(ptep_get(pvmw.pte))) { - lru_gen_look_around(&pvmw); + if (lru_gen_enabled() && pvmw.pte) { + if (lru_gen_look_around(&pvmw)) referenced++; - } - + } else if (pvmw.pte) { if (ptep_clear_flush_young_notify(vma, address, pvmw.pte)) referenced++; diff --git a/mm/vmscan.c b/mm/vmscan.c index cfa839284b92..6ab87dd1c6d9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -56,6 +56,7 @@ #include #include #include +#include =20 #include #include @@ -2594,6 +2595,11 @@ static bool should_clear_pmd_young(void) return arch_has_hw_nonleaf_pmd_young() && get_cap(LRU_GEN_NONLEAF_YOUNG); } =20 +static bool should_walk_secondary_mmu(void) +{ + return get_cap(LRU_GEN_SECONDARY_MMU_WALK); +} + /*************************************************************************= ***** * shorthand helpers *************************************************************************= *****/ @@ -3291,7 +3297,8 @@ static bool get_next_vma(unsigned long mask, unsigned= long size, struct mm_walk return false; } =20 -static unsigned long get_pte_pfn(pte_t pte, struct vm_area_struct *vma, un= signed long addr) +static unsigned long get_pte_pfn(pte_t pte, struct vm_area_struct *vma, un= signed long addr, + struct pglist_data *pgdat) { unsigned long pfn =3D pte_pfn(pte); =20 @@ -3306,10 +3313,15 @@ static unsigned long get_pte_pfn(pte_t pte, struct = vm_area_struct *vma, unsigned if (WARN_ON_ONCE(!pfn_valid(pfn))) return -1; =20 + /* try to avoid unnecessary memory loads */ + if (pfn < pgdat->node_start_pfn || pfn >=3D pgdat_end_pfn(pgdat)) + return -1; + return pfn; } =20 -static unsigned long get_pmd_pfn(pmd_t pmd, struct vm_area_struct *vma, un= signed long addr) +static unsigned long get_pmd_pfn(pmd_t pmd, struct vm_area_struct *vma, un= signed long addr, + struct pglist_data *pgdat) { unsigned long pfn =3D pmd_pfn(pmd); =20 @@ -3324,6 +3336,10 @@ static unsigned long get_pmd_pfn(pmd_t pmd, struct v= m_area_struct *vma, unsigned if (WARN_ON_ONCE(!pfn_valid(pfn))) return -1; =20 + /* try to avoid unnecessary memory loads */ + if (pfn < pgdat->node_start_pfn || pfn >=3D pgdat_end_pfn(pgdat)) + return -1; + return pfn; } =20 @@ -3332,10 +3348,6 @@ static struct folio *get_pfn_folio(unsigned long pfn= , struct mem_cgroup *memcg, { struct folio *folio; =20 - /* try to avoid unnecessary memory loads */ - if (pfn < pgdat->node_start_pfn || pfn >=3D pgdat_end_pfn(pgdat)) - return NULL; - folio =3D pfn_folio(pfn); if (folio_nid(folio) !=3D pgdat->node_id) return NULL; @@ -3358,6 +3370,26 @@ static bool suitable_to_scan(int total, int young) return young * n >=3D total; } =20 +static bool lru_gen_notifier_clear_young(struct mm_struct *mm, + unsigned long start, + unsigned long end) +{ + return should_walk_secondary_mmu() && + mmu_notifier_clear_young_fast_only(mm, start, end); +} + +static bool lru_gen_pmdp_test_and_clear_young(struct vm_area_struct *vma, + unsigned long addr, + pmd_t *pmd) +{ + bool young =3D pmdp_test_and_clear_young(vma, addr, pmd); + + if (lru_gen_notifier_clear_young(vma->vm_mm, addr, addr + PMD_SIZE)) + young =3D true; + + return young; +} + static bool walk_pte_range(pmd_t *pmd, unsigned long start, unsigned long = end, struct mm_walk *args) { @@ -3372,8 +3404,9 @@ static bool walk_pte_range(pmd_t *pmd, unsigned long = start, unsigned long end, struct pglist_data *pgdat =3D lruvec_pgdat(walk->lruvec); DEFINE_MAX_SEQ(walk->lruvec); int old_gen, new_gen =3D lru_gen_from_seq(max_seq); + struct mm_struct *mm =3D args->mm; =20 - pte =3D pte_offset_map_nolock(args->mm, pmd, start & PMD_MASK, &ptl); + pte =3D pte_offset_map_nolock(mm, pmd, start & PMD_MASK, &ptl); if (!pte) return false; if (!spin_trylock(ptl)) { @@ -3391,11 +3424,11 @@ static bool walk_pte_range(pmd_t *pmd, unsigned lon= g start, unsigned long end, total++; walk->mm_stats[MM_LEAF_TOTAL]++; =20 - pfn =3D get_pte_pfn(ptent, args->vma, addr); + pfn =3D get_pte_pfn(ptent, args->vma, addr, pgdat); if (pfn =3D=3D -1) continue; =20 - if (!pte_young(ptent)) { + if (!pte_young(ptent) && !mm_has_notifiers(mm)) { walk->mm_stats[MM_LEAF_OLD]++; continue; } @@ -3404,8 +3437,14 @@ static bool walk_pte_range(pmd_t *pmd, unsigned long= start, unsigned long end, if (!folio) continue; =20 - if (!ptep_test_and_clear_young(args->vma, addr, pte + i)) - VM_WARN_ON_ONCE(true); + if (!lru_gen_notifier_clear_young(mm, addr, addr + PAGE_SIZE) && + !pte_young(ptent)) { + walk->mm_stats[MM_LEAF_OLD]++; + continue; + } + + if (pte_young(ptent)) + ptep_test_and_clear_young(args->vma, addr, pte + i); =20 young++; walk->mm_stats[MM_LEAF_YOUNG]++; @@ -3471,22 +3510,25 @@ static void walk_pmd_range_locked(pud_t *pud, unsig= ned long addr, struct vm_area /* don't round down the first address */ addr =3D i ? (*first & PMD_MASK) + i * PMD_SIZE : *first; =20 - pfn =3D get_pmd_pfn(pmd[i], vma, addr); - if (pfn =3D=3D -1) - goto next; - - if (!pmd_trans_huge(pmd[i])) { - if (should_clear_pmd_young()) + if (pmd_present(pmd[i]) && !pmd_trans_huge(pmd[i])) { + if (should_clear_pmd_young() && + !should_walk_secondary_mmu()) pmdp_test_and_clear_young(vma, addr, pmd + i); goto next; } =20 + pfn =3D get_pmd_pfn(pmd[i], vma, addr, pgdat); + if (pfn =3D=3D -1) + goto next; + folio =3D get_pfn_folio(pfn, memcg, pgdat, walk->can_swap); if (!folio) goto next; =20 - if (!pmdp_test_and_clear_young(vma, addr, pmd + i)) + if (!lru_gen_pmdp_test_and_clear_young(vma, addr, pmd + i)) { + walk->mm_stats[MM_LEAF_OLD]++; goto next; + } =20 walk->mm_stats[MM_LEAF_YOUNG]++; =20 @@ -3543,19 +3585,18 @@ static void walk_pmd_range(pud_t *pud, unsigned lon= g start, unsigned long end, } =20 if (pmd_trans_huge(val)) { - unsigned long pfn =3D pmd_pfn(val); struct pglist_data *pgdat =3D lruvec_pgdat(walk->lruvec); + unsigned long pfn =3D get_pmd_pfn(val, vma, addr, pgdat); =20 walk->mm_stats[MM_LEAF_TOTAL]++; =20 - if (!pmd_young(val)) { - walk->mm_stats[MM_LEAF_OLD]++; + if (pfn =3D=3D -1) continue; - } =20 - /* try to avoid unnecessary memory loads */ - if (pfn < pgdat->node_start_pfn || pfn >=3D pgdat_end_pfn(pgdat)) + if (!pmd_young(val) && !mm_has_notifiers(args->mm)) { + walk->mm_stats[MM_LEAF_OLD]++; continue; + } =20 walk_pmd_range_locked(pud, addr, vma, args, bitmap, &first); continue; @@ -3563,7 +3604,7 @@ static void walk_pmd_range(pud_t *pud, unsigned long = start, unsigned long end, =20 walk->mm_stats[MM_NONLEAF_TOTAL]++; =20 - if (should_clear_pmd_young()) { + if (should_clear_pmd_young() && !should_walk_secondary_mmu()) { if (!pmd_young(val)) continue; =20 @@ -4030,6 +4071,31 @@ static void lru_gen_age_node(struct pglist_data *pgd= at, struct scan_control *sc) * rmap/PT walk feedback *************************************************************************= *****/ =20 +static bool should_look_around(struct vm_area_struct *vma, unsigned long a= ddr, + pte_t *pte, int *young) +{ + int secondary_young =3D mmu_notifier_clear_young( + vma->vm_mm, addr, addr + PAGE_SIZE); + + /* + * Look around if (1) the PTE is young or (2) the secondary PTE was + * young and one of the "fast" MMUs of one of the secondary MMUs + * reported that the page was young. + */ + if (pte_young(ptep_get(pte))) { + ptep_test_and_clear_young(vma, addr, pte); + *young =3D true; + return true; + } + + if (secondary_young) { + *young =3D true; + return mm_has_fast_young_notifiers(vma->vm_mm); + } + + return false; +} + /* * This function exploits spatial locality when shrink_folio_list() walks = the * rmap. It scans the adjacent PTEs of a young PTE and promotes hot pages.= If @@ -4037,7 +4103,7 @@ static void lru_gen_age_node(struct pglist_data *pgda= t, struct scan_control *sc) * the PTE table to the Bloom filter. This forms a feedback loop between t= he * eviction and the aging. */ -void lru_gen_look_around(struct page_vma_mapped_walk *pvmw) +bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw) { int i; unsigned long start; @@ -4055,16 +4121,20 @@ void lru_gen_look_around(struct page_vma_mapped_wal= k *pvmw) struct lru_gen_mm_state *mm_state =3D get_mm_state(lruvec); DEFINE_MAX_SEQ(lruvec); int old_gen, new_gen =3D lru_gen_from_seq(max_seq); + struct mm_struct *mm =3D pvmw->vma->vm_mm; =20 lockdep_assert_held(pvmw->ptl); VM_WARN_ON_ONCE_FOLIO(folio_test_lru(folio), folio); =20 + if (!should_look_around(vma, addr, pte, &young)) + return young; + if (spin_is_contended(pvmw->ptl)) - return; + return young; =20 /* exclude special VMAs containing anon pages from COW */ if (vma->vm_flags & VM_SPECIAL) - return; + return young; =20 /* avoid taking the LRU lock under the PTL when possible */ walk =3D current->reclaim_state ? current->reclaim_state->mm_walk : NULL; @@ -4072,6 +4142,9 @@ void lru_gen_look_around(struct page_vma_mapped_walk = *pvmw) start =3D max(addr & PMD_MASK, vma->vm_start); end =3D min(addr | ~PMD_MASK, vma->vm_end - 1) + 1; =20 + if (end - start =3D=3D PAGE_SIZE) + return young; + if (end - start > MIN_LRU_BATCH * PAGE_SIZE) { if (addr - start < MIN_LRU_BATCH * PAGE_SIZE / 2) end =3D start + MIN_LRU_BATCH * PAGE_SIZE; @@ -4085,7 +4158,7 @@ void lru_gen_look_around(struct page_vma_mapped_walk = *pvmw) =20 /* folio_update_gen() requires stable folio_memcg() */ if (!mem_cgroup_trylock_pages(memcg)) - return; + return young; =20 arch_enter_lazy_mmu_mode(); =20 @@ -4095,19 +4168,23 @@ void lru_gen_look_around(struct page_vma_mapped_wal= k *pvmw) unsigned long pfn; pte_t ptent =3D ptep_get(pte + i); =20 - pfn =3D get_pte_pfn(ptent, vma, addr); + pfn =3D get_pte_pfn(ptent, vma, addr, pgdat); if (pfn =3D=3D -1) continue; =20 - if (!pte_young(ptent)) + if (!pte_young(ptent) && !mm_has_notifiers(mm)) continue; =20 folio =3D get_pfn_folio(pfn, memcg, pgdat, can_swap); if (!folio) continue; =20 - if (!ptep_test_and_clear_young(vma, addr, pte + i)) - VM_WARN_ON_ONCE(true); + if (!lru_gen_notifier_clear_young(mm, addr, addr + PAGE_SIZE) && + !pte_young(ptent)) + continue; + + if (pte_young(ptent)) + ptep_test_and_clear_young(vma, addr, pte + i); =20 young++; =20 @@ -4137,6 +4214,8 @@ void lru_gen_look_around(struct page_vma_mapped_walk = *pvmw) /* feedback from rmap walkers to page table walkers */ if (mm_state && suitable_to_scan(i, young)) update_bloom_filter(mm_state, max_seq, pvmw->pmd); + + return young; } =20 /*************************************************************************= ***** @@ -5140,6 +5219,9 @@ static ssize_t enabled_show(struct kobject *kobj, str= uct kobj_attribute *attr, c if (should_clear_pmd_young()) caps |=3D BIT(LRU_GEN_NONLEAF_YOUNG); =20 + if (should_walk_secondary_mmu()) + caps |=3D BIT(LRU_GEN_SECONDARY_MMU_WALK); + return sysfs_emit(buf, "0x%04x\n", caps); } =20 --=20 2.46.0.792.g87dc391469-goog