Message ID | 20240529180510.2295118-2-jthoughton@google.com |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=qaUkWX9J; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=UmxKPS0c; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VqJy904kvz20Q9 for <incoming@patchwork.ozlabs.org>; Thu, 30 May 2024 05:15:58 +1000 (AEST) 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:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=vkWoeAkcLoR2cKK5JhnGongzSKi4QJzEJrU393i0hho=; b=qaUkWX9J87VHaLrgwzeAP4KRTi EamyEGAuVem/Bmg6ZL/FwwNwL1wK8OzqfyZbNho8f8lrHK0W+TAVleR5XHFhdpwF5nPwh9VgvVQF/ YTPhyPtJCKT407QMGe4QNVTLAUsF/ywUzawGVv59mbH4UimHmY/9zT2q/1UptZrbd+eCJYA/99gfD F21Tnm4xt5w7rLbLZY4D/YxoysFQpEppiYJBQj5kYESKspAZSGG6QuvO4NTzwvYL+dCvG+wgWijZ+ vsdmWXSjpJP1KhQeOH65tEYXMce70KXej9XlERjlaQG8iaETcDhB4LiTBrqKBWLsTN2K+O84B9Gxy FfQAzMEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCOmC-00000005JNe-1Vnp; Wed, 29 May 2024 19:15:56 +0000 Received: from mail-vk1-xa4a.google.com ([2607:f8b0:4864:20::a4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCNft-000000058hZ-4A0D for kvm-riscv@lists.infradead.org; Wed, 29 May 2024 18:05:23 +0000 Received: by mail-vk1-xa4a.google.com with SMTP id 71dfb90a1353d-4e4effa67adso21180e0c.1 for <kvm-riscv@lists.infradead.org>; Wed, 29 May 2024 11:05:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717005918; x=1717610718; darn=lists.infradead.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=nPLVZGS8AMw+CagEZYqGOZQVma0bD0XI55fQjmFacis=; b=UmxKPS0c0fohYeRBfe0k64qc4eo8AGM+nYpSdMg+TkGdsFoVq/MUpvskaMLkLEo4eO kloTeH+ji38OZvpfj1vf8f2HS4EQeDLpAdx+CMZMQgXqrI8AqrhZwMnd07IFGXumHS/5 lP0vg2tq2SbybXCYvhWfGwXqyRMj7o/GsYH7Yf+iY8Vo9hbbhCLnTla5IZ8ByWFgKary 4L4qpSJ6g1CwTQRBIvkYI0alVROZMpjKI3p6e2f8GMaIsaJwDF76TnRntCqM+1COWtU4 LcMo82B40mjQ9UBtBk0B8fm4FJ5ye0wS1A/JWUV7hBg1pWfD5cviwD5pCcS6cpjm0J7n M1eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717005918; x=1717610718; 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=nPLVZGS8AMw+CagEZYqGOZQVma0bD0XI55fQjmFacis=; b=PSBViJD5ppXFWKsQTouu5PZUXccBX09cWwbXicnwCcxV1CWSjwTacg94qNrNU/Vnph VkVSeKgEG1RpqSB9Su0o1XbaqJrVQMXJjJOggoWISoY+MSOy4FX8DdUOVnUIXBzq2qHq zz0cL0O7qmyRZUNGqHgvvJVNVUHv5d9CjkOkX6B12KLzhJDK1TR2x2ca9VFl8DpPHryD nbC6PDVOuyBxbDVqlPjUdp/qedlo1r9PbTcMqLPVszRUrg0bHYpdu8RudIKOk92dMwCs oq+0rN9zURcBeN63H/6bB9iBJ4djuQgM7smGzOTp1n//7XEMxle3onFvhVb/CGVccVcg +ndQ== X-Forwarded-Encrypted: i=1; AJvYcCUEug+wxNiM4ovly8q4qHCNBf/YMWfcVO2428LjCj/N7eQ1lt3A21tgEpuGT1MTGiBKpV8UwL1GN+VDGIGz861rfJHfD2Kx8XoztS0YPA== X-Gm-Message-State: AOJu0Yy6rw1VyYTNLU8a3tG9lSZgEZwZwTVU10zjfUwEB97vH5nUcqXY NGlsYFOWRNMRzrkF74in+j2C2gzFLqbtsO5Mfq3pDRA2MCXzSh/uGmHjf1MxC/RpktnNtvfxDzL +qmff8UrXyGww3Jvpxg== X-Google-Smtp-Source: AGHT+IHYErK4IEAw4AodIy6/uS9D/1KylfkBeNLUgQvcCMlB4bZF6bJgSfUsGpPUaVK45i5PNzhTyn3VxbK8rZqg X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a05:6122:2006:b0:4d8:797b:94e0 with SMTP id 71dfb90a1353d-4e4f0112182mr502860e0c.0.1717005918294; Wed, 29 May 2024 11:05:18 -0700 (PDT) Date: Wed, 29 May 2024 18:05:04 +0000 In-Reply-To: <20240529180510.2295118-1-jthoughton@google.com> Mime-Version: 1.0 References: <20240529180510.2295118-1-jthoughton@google.com> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog Message-ID: <20240529180510.2295118-2-jthoughton@google.com> Subject: [PATCH v4 1/7] mm/Kconfig: Add LRU_GEN_WALKS_SECONDARY_MMU From: James Houghton <jthoughton@google.com> To: Andrew Morton <akpm@linux-foundation.org>, Paolo Bonzini <pbonzini@redhat.com> Cc: Albert Ou <aou@eecs.berkeley.edu>, Ankit Agrawal <ankita@nvidia.com>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@atishpatra.org>, Axel Rasmussen <axelrasmussen@google.com>, Bibo Mao <maobibo@loongson.cn>, Catalin Marinas <catalin.marinas@arm.com>, David Matlack <dmatlack@google.com>, David Rientjes <rientjes@google.com>, Huacai Chen <chenhuacai@kernel.org>, James Houghton <jthoughton@google.com>, James Morse <james.morse@arm.com>, Jonathan Corbet <corbet@lwn.net>, Marc Zyngier <maz@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Oliver Upton <oliver.upton@linux.dev>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Raghavendra Rao Ananta <rananta@google.com>, Ryan Roberts <ryan.roberts@arm.com>, Sean Christopherson <seanjc@google.com>, Shaoqin Huang <shahuang@redhat.com>, Shuah Khan <shuah@kernel.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, Tianrui Zhao <zhaotianrui@loongson.cn>, Will Deacon <will@kernel.org>, Yu Zhao <yuzhao@google.com>, Zenghui Yu <yuzenghui@huawei.com>, kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240529_110522_063468_692CF1E2 X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Add this option so that one building the kernel can choose whether or not they want to support walking the secondary MMU. We want users to be able to blindly enable all lru_gen features to have the best possible performance most of the time. Walking the secondary MMU is mainly useful for be able to do proactive reclaim, [...] Content analysis details: (-7.6 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM welcome-list -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:a4a listed in] [list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. -0.0 DKIMWL_WL_MED DKIMwl.org - Medium trust sender X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <kvm-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/kvm-riscv/> List-Post: <mailto:kvm-riscv@lists.infradead.org> List-Help: <mailto:kvm-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" <kvm-riscv-bounces@lists.infradead.org> Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
mm: multi-gen LRU: Walk secondary MMU page tables while aging
|
expand
|
diff --git a/mm/Kconfig b/mm/Kconfig index b4cb45255a54..3ac4b1dbf745 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1222,6 +1222,14 @@ config LRU_GEN_STATS This option has a per-memcg and per-node memory overhead. +config LRU_GEN_WALKS_SECONDARY_MMU + bool "Walk secondary MMUs when aging" + depends on LRU_GEN && LRU_GEN_WALKS_MMU + help + This option allows multi-gen LRU to walk secondary MMU page tables + when aging. This allows for proactive reclaim, but this can reduce + overall performance (e.g. for a KVM VM). + config LRU_GEN_WALKS_MMU def_bool y depends on LRU_GEN && ARCH_HAS_HW_PTE_YOUNG
Add this option so that one building the kernel can choose whether or not they want to support walking the secondary MMU. We want users to be able to blindly enable all lru_gen features to have the best possible performance most of the time. Walking the secondary MMU is mainly useful for be able to do proactive reclaim, and it is possible that doing this can harm VM performance. This option should be enabled by users who run VMs and also care to do proactive aging/reclaim with MGLRU. With this config option enabled, a user can still disable the new functionality at runtime through sysfs. Signed-off-by: James Houghton <jthoughton@google.com> --- mm/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)