From: R Nageswara Sastry <rnsastry@linux.ibm.com>
To: "Albert Esteve" <aesteve@redhat.com>, "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Shuah Khan" <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v6 2/3] selftests: cgroup: Add KB() helper
Date: Thu, 10 Sep 2026 12:20:16 +0530 [thread overview]
Message-ID: <f6f1d5be-c5b1-4296-828d-526f0f11ba9f@linux.ibm.com> (raw)
In-Reply-To: <20260831-kunit_cgroups-v6-2-63b6c7695287@redhat.com>
On 31.08.2026 6:55 PM, Albert Esteve wrote:
> cgroup_util.h already has MB() and GB() for size
> literals. Add KB() in the same style so tests can
> spell kilobyte values without in-code shifts.
>
> Signed-off-by: Albert Esteve <aesteve@redhat.com>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
System: ppc64le LPAR (IBM POWER), Linux 7.3-rc2
# insmod test_modules/dmem_selftest.ko
# ./test_dmem
TAP version 13
1..2
ok 1 test_dmem_max
ok 2 test_dmem_alloc_byte_granularity
# Totals: pass:2 fail:0 xfail:0 xpass:0 skip:0 error:0
> ---
> tools/testing/selftests/cgroup/lib/include/cgroup_util.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/testing/selftests/cgroup/lib/include/cgroup_util.h b/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
> index 5d39c709ac7a..0e5d7b87ad19 100644
> --- a/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
> +++ b/tools/testing/selftests/cgroup/lib/include/cgroup_util.h
> @@ -6,6 +6,7 @@
> #define BUF_SIZE 4096
> #endif
>
> +#define KB(x) (x << 10)
> #define MB(x) (x << 20)
> #define GB(x) ((unsigned long long)(x) << 30)
>
>
--
Thanks and Regards
R.Nageswara Sastry
next prev parent reply other threads:[~2026-09-10 6:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 13:25 [PATCH v6 0/3] cgroup: dmem: add selftest helper and coverage Albert Esteve
2026-08-31 13:25 ` [PATCH v6 1/3] selftests: cgroup: Add dmem_selftest helper module Albert Esteve
2026-09-10 6:49 ` R Nageswara Sastry
2026-08-31 13:25 ` [PATCH v6 2/3] selftests: cgroup: Add KB() helper Albert Esteve
2026-09-10 6:50 ` R Nageswara Sastry [this message]
2026-08-31 13:25 ` [PATCH v6 3/3] selftests: cgroup: Add dmem selftest coverage Albert Esteve
2026-09-10 6:50 ` R Nageswara Sastry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6f1d5be-c5b1-4296-828d-526f0f11ba9f@linux.ibm.com \
--to=rnsastry@linux.ibm.com \
--cc=aesteve@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=shuah@kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®