Re: [LTP] [PATCH] hugepages: ensure CONFIG_COMPACTION is defined

Petr Vorel <[email protected]>
Newsgroups it.linux.lists.ltp
Message-ID <20260717093240.GA316902@pevik>
Hi Andrea,

> Add check to ensure CONFIG_COMPACTION=y when we need to use hugepages
> inside tests. The kernel configuration is used to enable usage of
> `/proc/sys/vm/compact_memory` inside the LTP core library.

> The issue was raised by https://github.com/linux-test-project/ltp/pull/1335
> that is trying to solve a problem with cachestat03.
> ---
>  lib/tst_hugepage.c | 5 +++++
....
> +	if (access(PATH_VM_COMPACT_MEMORY, F_OK)) {
> +		if (hp->policy == TST_NEEDS || hp->policy == TST_REQUEST)
> +			tst_brk(TCONF, "CONFIG_COMPACTION not enabled in kernel");

I'd at least add a question mark when it's not based on a real kconfig
inspection. Because there might be different reasons for missing file in the
future.

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.