From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 2031A242D6C for ; Sun, 2 Aug 2026 22:19:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785709193; cv=none; b=Cbsh5OSwC7aQ64zUD8Ayal67WZGksxH1elpsbiymin3d5wWZ1zcVeCH0mzYT4giASlUKw6eAdnYwsQVghsZZEvwUs3I3mjblnbczkXslsUBJdh2e4//cgjQYtnnM9tP0JgBloPc+EeLcZcKgioJSf6ltFGc2Edj9GVDZDXykpno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785709193; c=relaxed/simple; bh=gjHnJV6K/ts9J7nYwIJSVtUsKwNIONuq0AKzdke7uEg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=lr2eGorODbP3PpUqDlZ0ojJeeowGhEUUwAoyjsRKw+FUNtsI0YNJGHFFoYDYn35RPxLo1/6sKREw67A2+szSTU383RsYbP3Nd6C4PjP8DnEclO8gYqEvNHF5WX2N5nCwiqWZAUiR/TDWC3YyGypoPJHZGukDSBwPIM+CBwHnWbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=uA9xtXeb; arc=none smtp.client-ip=209.85.214.170 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=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uA9xtXeb" Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2ccdf36f63dso83285ad.0 for ; Sun, 02 Aug 2026 15:19:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1785709191; x=1786313991; darn=vger.kernel.org; h=content-type:mime-version:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=T9PxmJvgH++4wFP7ID3jQ6AJu2hUuoRabft5a9u/mZc=; b=uA9xtXebDuo23oyLrnS0dHRd81m2p1R5WGVBrEpDcq3c9yDW4heCgelr0fJ8pRWg0v i1BRK19u+WB7ShOZyjJdltnM2RmolK9TixnYSOvemQcbDSijcn6XiYcjraBtGVbJf8pO znckQnHiU2LMK64sSN387Stb++PnJz0/eh7SYD5q0tuOcI3rapq4U0786ZsbwKwHWtgv ByAk0KgUAEsQonGHPMdybp/zFeR3xwK7FulfL3v52lO9n8hzjstw+e2X1yLG6rS6qJgQ BwFz8yBkyg/Tby+4fE9wGaFtYXqkFwN8Zh7+46i584GwJXH4L4a/N4ScdBO2F9uFnhLp DQww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785709191; x=1786313991; h=content-type:mime-version:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T9PxmJvgH++4wFP7ID3jQ6AJu2hUuoRabft5a9u/mZc=; b=WezYPI93IUa2l+IQf2XjyatKb1+GHQV6W3PP7nLanrya/Y6Wkyk/XLPshMN3N0G1TU /xKOQw5DYl8WOOOBTvj7ofh8yhk12hSXjizChuTl8ZoBwKcld+SqaAF+exRG1LAyaMbg K1AL0poUABaYHMd9Ciub4ltY/OIW22Qo1yCfce0ecCd394NJFssS9iuw7un3nqkw/oP/ ibDH49XDAA+WR0XI+qjKsCSyzG209eddDTJ0t4a9uwu5zWj0QJc6dB/2+bX9uobwZTGA lGtXLYj6xqZeIhh6aQ+xK0b9qgXIfRhzyPTkBgJfX/EMIo1j3MkSxgifcxPk8g8KocRN EgQQ== X-Forwarded-Encrypted: i=1; AHgh+RraPZExOcTtb6e0BkEcsmvC/cneaNTcVTprP1ysDgek7zXZdOjpS42wDWI6iMRDzNWLCG9Sarot+2Dz2hY=@vger.kernel.org X-Gm-Message-State: AOJu0Yzu+wGjkXrT1zhzz+2vfNw5vQQIjCMqdQy6NvrgMY8hcQXqk96q PsqC50dJIJszNsss4WJOpICKB5xyGJZIjoNszRdKzp9REOjNQlJCxBxpxAyV06PFww== X-Gm-Gg: AR+sD139McpyLNt6FC3RLZg8OWsBva7E/fh2f//MHx8+uQF61hjG6P8M5691MKwBGs7 4ExosLM14suA+Cqw3YVj4uAnwNj7eaqf+oXrxuCSUCbi8+mTWv3e6ymZUOjpx3XiQoIzN8Sj4IQ GUsnTcMXzl1BnMJuGSsWFCkk/0fphhjR0JabmiAaWxUhuM+gJtc3VX54iXZESNGRiVT01cumSGC B79ZV6GARvEpYVU3evXLl5B5OhQqI1K/cPzhPuc/x6avYEqpXO+6btz4k8Pq6LgVKOT2z1foc5G aeu8j+2NzRD1NYM6cMRtMPZRMsS3xIRN44kFvuLtoYXgYmNy7opsk1+GRJU/GEUR2BCXGzY3pJi sZ/Wk1MxFhBDOhgHdtzp1hKaV8SWptzSKET5t2TmREWRAVil8Yua/lEK/hM0r3OKgzMpxYdBOmy N6IK52vPYfV1mHZgyDZtmi1bZS9kJlE8+uMzjcNBOCMEe10Upis8wJiPYYqiVqhhcyoZlFXrIzY twRifFbJk0+SUXh9CC34/9r01YAr5sTNtWZKiVMSvxs/fS3tWnJjwdjpF5KWItfoa2vZkULkhMs HoNwHw+tXxZ1lkN9CwSitQ6cJGA= X-Received: by 2002:a17:902:da81:b0:2ca:6bf:5bac with SMTP id d9443c01a7336-2d0547c255emr7641115ad.8.1785709190721; Sun, 02 Aug 2026 15:19:50 -0700 (PDT) Received: from [2a00:79e0:2eb4:9:b3ef:da16:936a:c7c9] ([2a00:79e0:2eb4:9:b3ef:da16:936a:c7c9]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84edc29f2b9sm2774436b3a.35.2026.08.02.15.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 15:19:49 -0700 (PDT) Date: Sun, 2 Aug 2026 15:19:48 -0700 (PDT) From: David Rientjes To: "David Hildenbrand (Arm)" cc: Andrew Morton , Christoph Lameter , Vlastimil Babka , Mathieu Desnoyers , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch 0/3] lib: add synthetic MM benchmarks In-Reply-To: Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Fri, 31 Jul 2026, David Hildenbrand (Arm) wrote: > On 7/31/26 06:26, David Rientjes wrote: > > A blast to the past :) > > > > :) > > > We've been carrying these synthetic benchmarks in our kernel tree since > > 2009 because they've been helpful to identify regressions in hot paths, as > > well as quantifying any improvements that have been made for new changes. > > Hopefully they can be useful to others as well. > > > > The synthetic benchmarks are run by loading the module at runtime. The > > modprobe will fail intentionally so that the module gets insta-unloaded. > > The test results are emitted to the kernel log. > > > Ideally we'd have an easy way to actually use them in autoamtic tests. > > E.g., loading fails -> error, loading works -> no error (and unload) > > > > > Proposed with permission from Christoph. > > --- > > lib/Kconfig.debug | 30 ++++ > > lib/Makefile | 3 + > > lib/test_pagealloc.c | 337 ++++++++++++++++++++++++++++++++++++++ > > lib/test_slab.c | 375 +++++++++++++++++++++++++++++++++++++++++++ > > lib/test_vmstat.c | 95 +++++++++++ > > 5 files changed, 840 insertions(+) > > create mode 100644 lib/test_pagealloc.c > > create mode 100644 lib/test_slab.c > > create mode 100644 lib/test_vmstat.c > > This looks similar to tools/testing/selftests/mm/test_vmalloc.sh and friends, > that can actually be executed as part of our selftests and do a modprobe. > > Can we have similar scripts to execute them? > Thanks for looking at these tests! Good call, I agree these could be loaded with a wrapper similar to test_vmalloc.sh. All three of these tests don't take module parameters (yet?) so right now this wrapper would just do the equivalent of check_test_requirements(), usage(), and run_test() where we'd pass in a single option for now, "performance". > But I also wonder if these test modules could be placed then in > tools/testing/selftests/mm/ instead (or some subdirectory for test modules). > I thought about the same and just followed what appears to be the standard convention (like test_vmalloc above) for lib/ for now. If they should all be moved under tools/ somewhere, perhaps we handle that in a separate series? > Last but not least: MAINTAINERS should cover them. > Ack. > -- > Cheers, > > David >