torture: Add get_torture_init_jiffies() for test-start time
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 13 Nov 2024 22:57:51 +0000 (14:57 -0800)
committerBoqun Feng <boqun.feng@gmail.com>
Wed, 5 Feb 2025 15:14:24 +0000 (07:14 -0800)
commit623b52802bb0b33bee28716002249aae5d89c5ec
tree38b42ddcfe8f6df4a158afba19c017f487d88b60
parent2014c95afecee3e76ca4a56956a936e23283f05b
torture: Add get_torture_init_jiffies() for test-start time

This commit adds a get_torture_init_jiffies() function that returns the
value of the jiffies counter at the start of the test, that is, at the
point where torture_init_begin() was invoked.

This will be used to enable torture-test holdoffs for tests implemented
using per-CPU kthreads, which are created and deleted by CPU-hotplug
operations, and thus (unlike normal kthreads) don't automatically know
when the test started.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
include/linux/torture.h
kernel/torture.c