From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B489D606A31F for ; Sun, 6 Dec 2026 02:04:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=bO9FQr90 Received: by kanga.kvack.org (Postfix) id 9AF496B00EF; Sat, 5 Dec 2026 21:04:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 95EFD6B05B1; Sat, 5 Dec 2026 21:04:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84D336B05B2; Sat, 5 Dec 2026 21:04:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3F3FE6B00EF for ; Sat, 5 Dec 2026 21:04:07 -0500 (EST) Received: from smtpin18.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 654E5140695 for ; Sun, 6 Dec 2026 02:04:04 +0000 (UTC) X-FDA: 85511912808.18.97B3C2F Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by imf07.hostedemail.com (Postfix) with ESMTP id 99C8740012 for ; Sun, 6 Dec 2026 02:04:02 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20260707 header.b=bO9FQr90; spf=pass (imf07.hostedemail.com: domain of rientjes@google.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796522642; b=uBsXWFZ3qNLq79B9sjhRqHlOXTh1aV/DsjS+wZEmfWvGN8k/X0Tzpk0/VeLycFa4BlUCiz bsTB9XJCZJD6pqfgviLDrURzTDDSc3HyPYbQohGx6FV2eFgkM5JLd2lEEF/bCJMWj2oAXC zvPDeDQZAFFuHARsPOakH0F2DqDoj78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796522642; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=s1coSBzLO6UdBd8wVQmSkby0Skhfi2qvMh32zXh5xLE=; b=lek7xqNqJF4FcZhHf1hWlZU1f03UAQnSC1rY42ZFNxzpDBug7lhYBTDKI/0dcb6tuWStjd r9yf2zLN36KrlI4CPbIwfNlp7z4xzkggkUHwb7RARPdNQGnrrZN6GFlnvnUR1zPZfJS3ZX JvZdwS6i2gnxWXX3hILU+NwvCg0VH5E= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20260707 header.b=bO9FQr90; spf=pass (imf07.hostedemail.com: domain of rientjes@google.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2f146d5607aso43315ad.0 for ; Sat, 05 Dec 2026 18:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796522641; x=1797127441; darn=kvack.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=s1coSBzLO6UdBd8wVQmSkby0Skhfi2qvMh32zXh5xLE=; b=bO9FQr908AC83KRp4KEjEjH/R/hZJwb7zEup+PYZQlBcZjhuyZl88ONTlfE30wL9zi lqNVEF5w9YOpOYnHtpwgYhzpiRWfHEKmH9nxB2LtoH3cNwYt87iD5cc8MLf7m1XIP+pA 3p/bA76JPLmvwacW3uoaQeVMXAtR7kxrkeWBqSY8J7/xQqeS+DFy9UfPIq9YLzdncZbl 5OCK/M1rBSKTrPoiVosMHLAzLDCbmpPinhq4jWZzxexSEpHwU6oeo0JN0nE4aFEL/Ong CrDLABrYSKIJX+maIfdql1wVxqeIfeRE/ytjB659/GQ8M/QKmvhvjEYu8yfhNC7CaywX D7nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796522641; x=1797127441; 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=s1coSBzLO6UdBd8wVQmSkby0Skhfi2qvMh32zXh5xLE=; b=Nyk5U+Jigj8okc6lnZV/i4cZo+eOa6/HeITZfoPc18dmooO1GMUYhe0NXdWPy7XP4n vdXdSyHi42cwt3WES32D+SuIAd9KiFyVPs70UJfCog7HMryxO5PYKsIV63isil6rqtod n05bQOjD6MOzGExEEJ+yec2Cna4/82WOZajvjzo4RJ0N4UyydIbidfz895o2pLazhi3O 9fKlapja87rVvX1WNi5KpjXnb103sw6CphE8ougaHLZwHghr4nyybLfrzgUs90uX0NHC aXNhALC64kogWLHH41A2b4Re0opR7qkhhb1yRznSGDdz9mgUnidzkQHqiKoxLKV4Q+6R kfPA== X-Forwarded-Encrypted: i=1; AL+hErGxL7CVsmMbACOOl8BYcN8GUplhJIsBBl1fn5qrNzj7918/2BCL+ctA+SgcrOb8WnFfDiVDCfgecQ==@kvack.org X-Gm-Message-State: AB4q+uGAibBuHcuL8rkOelPVb6GwLf2/Qpkxcn0D+ZjsZpgh4+L4i8bN Ac1SwepsOG4KQsaMT5R9fSlGSieUITjzAa7/DAC9G7HVy1RInc/Hhp/kmn4IY2WcPQ== X-Gm-Gg: AZFdTZcFI1wSXSD61dTR6+bbyZYbYiA7R1lea0/Yi+ENcxkKh7UgZvR1npYmxMsn/Ja sflNnPwZ+zm0Cz9kiFOccuQlNK5wUKEKGwinhb01KXRE4mN445AF5vLje9+Cth3oTPpBMnOTtTx SHdrDz8p6W7lk3bywyNtc1lVYgTGNc5vIOvr5OP5sbbVfunmt6e3GlgDHBD9JEyR/RupQJ9ypbT 7FHeBCBcRnZXF1gShS65fAbUbhIMQut9yL5h8DekJ54aq2qEF3i+80lG16OZJzsRpBX5tKC7tH1 tYFnzqc5X/JpnYAgjAHnLAa9bj7kTrzTNcMXNAo9vYpIwywOT1Yfp1E2TO+8XiRj4I+e+rzcM2i iZd5ptlSfOSTXBJe/YrnGMtIkvcJzZDmFMSGOf+kGiIYMxsaPhKIUXDOhKg1qM9uELzxD84Ketr sQCLgUe/QbNTz2+HzzYAkeJx6DDyUJXduf8Px/uY52mrHJ4e+I6iuYbD23sh1MKaBw+GZZaWYY9 x1SPlsEwB7iofA/5BM7HccHQ7SeQfBNtq1nOxOLPulzLgG+bNn36MxDUq1t2UXK93GmW3A12aQF Jog1powKoBStj8oa2bLXi3o8RAUeL5Jj1Ttiq5ZmfSKM7yvuFvqC+pHFYVLfswmag3A8SWzNOt5 xCRTGKTqRM6xCunvWgwZszQp4xDQYawA5rtEEJXHfDTzPn93eQmvI6Ga7vnFI6ImgwzNcrPBTQZ oG1pnHBCnGMrnuxPFM7grDYpL+AlxotJdVZ8TVbyG3Mw== X-Received: by 2002:a17:903:2985:b0:2e7:e742:8bb5 with SMTP id d9443c01a7336-2f1f4d290f0mr1538035ad.14.1796522640440; Sat, 05 Dec 2026 18:04:00 -0800 (PST) Received: from [2a00:79e0:2eb4:9:4af:b01b:ed89:6bed] ([2a00:79e0:2eb4:9:4af:b01b:ed89:6bed]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ce123461bcbsm3424916a12.3.2026.12.05.18.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 18:03:59 -0800 (PST) Date: Sat, 5 Dec 2026 18:03:58 -0800 (PST) From: David Rientjes To: "Vlastimil Babka (SUSE)" cc: Andrew Morton , David Hildenbrand , Christoph Lameter , Mathieu Desnoyers , Sarthak Sharma , Johannes Weiner , Suren Baghdasaryan , Brendan Jackman , Zi Yan , Harry Yoo , Hao Li , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [patch v2 1/2] mm: page_alloc_kunit: add synthetic benchmark for the page allocator In-Reply-To: Message-ID: <29ac4aa2-ccef-5442-b3bd-5cfb314050b3@google.com> References: <20261129212551.1812084-1-rientjes@google.com> <20261129212551.1812084-2-rientjes@google.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 99C8740012 X-Rspam-User: X-Stat-Signature: mjycs47sbfhbui8gnfdopkha6dkkirux X-Spam-Status: No, score=-23.5 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=4.0.1 X-HE-Tag: 1796522642-313818 X-HE-Meta: U2FsdGVkX1/j15e4Sn3PTpQUqLMjZKCBBOcdxg9WH9syaBK2qYnvTVTB4Y1hrZxLNKFg1mRt1MGpo3/oqaNAnrh7p/i9tTxbp/xmVbMNfgncLk//EKMyMhXNe+9tevix4KBslgZNahd0mCeuALKyqKeZlhecPqJO8VF0rAXA9cHWaZDhrJnImhCgVvALtPIOhPgrsUX3qGu1H66NGl5dl2BVWixOD91FR/UH628pJXBqwYm82EUf3IIAI2V7s45KYvq3jZeWmm1MYdaIHBkgpOH72/5gHmrh5gjLg9QNIzm0WGflJF0QD5yk1LDiUa1t2orSrqNPpqmDVNTqhdnw0xr7YYybhbjtQZ+MA6sxW501Sr5cl33q5xgBtA21scVpRHiD+CcP6KEI805jfr0ydNfdzuCdAFjrmmBo6E1fCWYCP7HcNEdK8zTUBLQebDcM9C7Ir/ICjT5lFnGLsJB1s2eOxQ5xXOpmwWdr+VO980mgi+zgFMoqyU88tdP8fQB1KP/eJgVKyNfoppMVhVrj0oV3Olke0elMrYxn1+gbUhLJTqybs+I3lw5F1eWpghIth3BpzAT+BEVM6xvTH4fKUYzGyFXPo5jF0Y4zCKWEP0cFT66hsPQChuyG6y7suAgvMoGyD0Rx1Iw57De41oxxJzaYA2Jic6XYNQZ3aDRuKtCbyjzpdvg/Q815mWfFJKnVz5wnJa4pPBhwsJf6gh1AN0vJrWAj5vjdAKojL1w33uU7Mu++/Pwq39rIGUx+7FkisxOrHF4SJUcaso4WnLydkZoIKtJhfaCP4kda1MiHjDfPxHPRvzyLSt2llBytuJkk+WsapDCmEX2zUogy7GsFGBZaFxpkdxyqHtD4uaYtfZNNzA+6IZV5n9m72J2vqawocm2jTqcVoqxcAjEYGhbUN+5uKz1rMmurUpaDjrOVa+LQFr+AHvBFS9o3dcx73rzqqrk7IZKm0EyD28vWmWY yxOJ3dXJ a5I3UgjkZ2DQkJ5IZK0jK66REJTHcb2UIE6jJDqXPGNkbOmhpybnLyCBMFoZB/SjpQVZA2s87aXTzk9/9ISAzvgfH8g5yz+fHlPJbx3qb97Z5nTQXCOW5NrID2M6UcSCfK3xfiP3A5LIm9Vdm2u8NEYzB8EKqsmiKj/j28INIa32eIY8ZG6DM5Q/iUawxVo7FSZ08diXmf52VY2KMoitv+7OlORaoy0kSUPrB6/S/K3nclnjmy/ibdJPyqrRZOuDwSHB3iKvgbA9LLQgd17E5HHMNFUGdkKA5VtnpmidGquz3an4JCZoyAaAT7JkqKAQytSuAOTZqAIXIw/7av6FdYRMSf1U/yYMF2mHqxGavQ8r/kV2kzEH5s7hnf/OOk+qbgA8NPOGbFJG/fGcBq2q6UnBQawPnAe1nbEAIRAKHlWdUkS90TDZIM/QBmXgavL8jXZdCVIiJxe0KceRNRHF858JgsuhS9uvxU2JC0w/NO6Ic1tGrkV5TlcbO+hWZ66WVhlq1qRR81v3CIQraYBFc/QHL0RGsVavGmTyjCMV+JHnxYH6wRbweI6RDRIMnVg7DyxDtSTtAAMMWUNM2kJH9KmJrTnkoU9CzmnU4Ll9F6nsBn150GUhWbb80tae4qL19BeQ6uC8lVWuZkeAoOVQLye2DgLxSaWVZQAEyRjwsiHLy63UEz35U3KX6T+4d3ZIMDAjC Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, 2 Dec 2026, Vlastimil Babka (SUSE) wrote: > > From: Christoph Lameter > > > > Add a synthetic benchmark that can be used to measure performance of the > > page allocator. This is used to analyze any improvements or regressions > > in the allocation and free paths, which are among the hottest paths in MM. > > > > This is the second of three tests that measure the execution times of > > critical MM functions anticipated to be used by developers to measure the > > impact of any core changes that would end up causing workload performance > > issues. Google has carried these tests internally and kept them updated > > since Christoph posted them back in 2009 for this purpose. > > ... > > > This can also be used to detect regressions over time, from kernel > > version to kernel version, independent of development use cases. > > > > The benchmark covers, for each page order: > > > > - allocating a batch of pages and then freeing them, from a single thread > > - allocating and immediately freeing a page, from a single thread > > - both of the above concurrently on all online CPUs > > - allocating pages on all CPUs but one and freeing them all from that > > one CPU (remote free) > > > > Allocations use __GFP_NORETRY | __GFP_NOWARN so that the benchmark does not > > invoke the oom killer on small systems; if memory runs out, the results > > are reported for the pages that could be allocated. > > > > The test is run by KUnit or doing modprobe page_alloc_kunit directly. > > > > Sample output (abbreviated): > > KTAP version 1 > > 1..1 > > KTAP version 1 > > # Subtest: page_alloc > > # module: page_alloc_kunit > > 1..5 > > # page_alloc_test_alloc_then_free: order 0: 1000 ops: alloc_pages -> 4074 cycles (1008 ns/op), __free_pages -> 1240 cycles (298 ns/op) > > ... > > ok 1 page_alloc_test_alloc_then_free > > # page_alloc_test_alloc_free_pair: order 0: 1000 ops: alloc/free pair -> 3036 cycles (746 ns/op) > > ... > > ok 2 page_alloc_test_alloc_free_pair > > # page_alloc_test_concurrent_alloc_then_free: order 0: 4 cpus, 4000 ops: alloc_pages -> 4880 cycles (1208 ns/op), __free_pages -> 4832 cycles (1171 ns/op) > > ... > > ok 3 page_alloc_test_concurrent_alloc_then_free > > # page_alloc_test_concurrent_alloc_free_pair: order 0: 4 cpus, 4000 ops: alloc/free pair -> 3695 cycles (892 ns/op) > > ... > > ok 4 page_alloc_test_concurrent_alloc_free_pair > > # page_alloc_test_remote_free: order 0: 4 cpus, 3000 ops: alloc_pages -> 5763 cycles (1442 ns/op), remote __free_pages -> 1707 cycles (414 ns/op) > > ... > > ok 5 page_alloc_test_remote_free > > # page_alloc: pass:5 fail:0 skip:0 total:5 > > # Totals: pass:5 fail:0 skip:0 total:5 > > ok 1 page_alloc > > > > Signed-off-by: Christoph Lameter > > ... you should probably have at least "Co-developed-by: yourself" here, so > that coveres all the updates at google. > Sure, will do. > > Signed-off-by: David Rientjes > > --- > > MAINTAINERS | 1 + > > mm/Kconfig | 12 + > > mm/Makefile | 1 + > > mm/tests/page_alloc_kunit.c | 490 ++++++++++++++++++++++++++++++++++++ > > 4 files changed, 504 insertions(+) > > create mode 100644 mm/tests/page_alloc_kunit.c > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index f2670f0547b2..741354a460fe 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -17916,6 +17916,7 @@ F: mm/page_reporting.h > > F: mm/show_mem.c > > F: mm/shuffle.c > > F: mm/shuffle.h > > +F: mm/tests/page_alloc_kunit.c > > F: scripts/gdb/linux/page_owner.py > > F: tools/mm/page_owner_filter.c > > F: tools/mm/page_owner_sort.c > > diff --git a/mm/Kconfig b/mm/Kconfig > > index d6131fb7c1e6..1fa0c824fbe9 100644 > > --- a/mm/Kconfig > > +++ b/mm/Kconfig > > @@ -1492,6 +1492,18 @@ config VMSTAT_KUNIT_TEST > > > > If unsure, say N. > > > > +config PAGE_ALLOC_KUNIT_TEST > > + tristate "KUnit test for the page allocator" if !KUNIT_ALL_TESTS > > + depends on KUNIT > > + default KUNIT_ALL_TESTS > > + help > > + Enable this option to test and benchmark the performance of the > > + page allocator: allocating and freeing pages of each order from a > > + single thread, concurrently on all CPUs, and freeing pages on a > > + different CPU than the one that allocated them. > > + > > + If unsure, say N. > > + > > config ARCH_HAS_CHECK_WX > > bool > > > > diff --git a/mm/Makefile b/mm/Makefile > > index f49994e61b03..9e0c4c6c6cbb 100644 > > --- a/mm/Makefile > > +++ b/mm/Makefile > > @@ -150,4 +150,5 @@ obj-$(CONFIG_EXECMEM) += execmem.o > > obj-$(CONFIG_TMPFS_QUOTA) += shmem_quota.o > > obj-$(CONFIG_LAZY_MMU_MODE_KUNIT_TEST) += tests/lazy_mmu_mode_kunit.o > > obj-$(CONFIG_VMSTAT_KUNIT_TEST) += tests/vmstat_kunit.o > > +obj-$(CONFIG_PAGE_ALLOC_KUNIT_TEST) += tests/page_alloc_kunit.o > > obj-$(CONFIG_MEM_ALLOC_PROFILING) += alloc_tag.o > > diff --git a/mm/tests/page_alloc_kunit.c b/mm/tests/page_alloc_kunit.c > > new file mode 100644 > > index 000000000000..a1d4b0a1ef3d > > --- /dev/null > > +++ b/mm/tests/page_alloc_kunit.c > > @@ -0,0 +1,490 @@ > > +// SPDX-License-Identifier: GPL-2.0-or-later > > +/* > > + * KUnit synthetic performance benchmark for the page allocator. > > + * > > + * (C) 2009 Linux Foundation, Christoph Lameter > > + * (C) 2026 Google LLC, David Rientjes > > + */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#define TEST_COUNT 1000 > > + > > +/* Highest order used by the concurrent tests, which allocate on every CPU. */ > > +#define CONCURRENT_MAX_ORDER min(5, MAX_PAGE_ORDER) > > + > > +/* > > + * This is a benchmark, not a stress test: fail the allocation rather than > > + * retry hard or invoke the oom killer if the system is short on memory. > > + */ > > +#define TEST_GFP (GFP_KERNEL | __GFP_COMP | __GFP_NOWARN | __GFP_NORETRY) > > + > > +#define BENCH_FMT_LEN 48 > > + > > +struct bench_stat { > > + cycles_t start_cycles; > > + u64 start_ns; > > + u64 cycles; > > + u64 ns; > > + u64 ops; > > +}; > > + > > +static void bench_start(struct bench_stat *stat) > > +{ > > + stat->start_cycles = get_cycles(); > > + stat->start_ns = ktime_get_ns(); > > +} > > + > > +static void bench_stop(struct bench_stat *stat, u64 ops) > > +{ > > + u64 stop_ns = ktime_get_ns(); > > + cycles_t stop_cycles = get_cycles(); > > + > > + stat->cycles = (cycles_t)(stop_cycles - stat->start_cycles); > > + stat->ns = stop_ns - stat->start_ns; > > + stat->ops = ops; > > +} > > + > > +static void bench_add(struct bench_stat *sum, const struct bench_stat *stat) > > +{ > > + sum->cycles += stat->cycles; > > + sum->ns += stat->ns; > > + sum->ops += stat->ops; > > +} > > + > > +/* Format the average cost of an operation; not all arches have get_cycles() */ > > +static const char *bench_fmt(char *buf, const struct bench_stat *stat) > > +{ > > + u64 ops = max(stat->ops, 1); > > + u64 cycles = div64_u64(stat->cycles, ops); > > + u64 ns = div64_u64(stat->ns, ops); > > + > > + if (cycles) > > + scnprintf(buf, BENCH_FMT_LEN, "%llu cycles (%llu ns/op)", cycles, ns); > > + else > > + scnprintf(buf, BENCH_FMT_LEN, "%llu ns/op", ns); > > + return buf; > > +} > > + > > +/* > > + * Test 1: Allocate TEST_COUNT pages of each order, then free them all. > > + */ > > +static void page_alloc_test_alloc_then_free(struct kunit *test) > > +{ > > + char alloc_buf[BENCH_FMT_LEN], free_buf[BENCH_FMT_LEN]; > > + struct bench_stat alloc, free; > > + struct page **pages; > > + unsigned int order; > > + unsigned int nr, i; > > + > > + pages = kunit_kcalloc(test, TEST_COUNT, sizeof(*pages), GFP_KERNEL); > > + KUNIT_ASSERT_NOT_NULL(test, pages); > > + > > + for (order = 0; order <= MAX_PAGE_ORDER; order++) { > > + bench_start(&alloc); > > + for (nr = 0; nr < TEST_COUNT; nr++) { > > + struct page *page = alloc_pages(TEST_GFP, order); > > + > > + if (!page) > > + break; > > + > > + /* Touch page */ > > + memset(page_address(page), 22, 4); > > I wonder if this is useful at all for the benchmark. Also some of the other > tests do that, some not. Maybe drop it from all of them? > Yeah, these can be removed. I think they were in the original tests back in 2009 but I agree that they are only a liability here. slab_kunit (soon to be slab_bench) does the same thing but not with memset(), will take care of those as well.