mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
The torture_shutdown_init() function spawns a shutdown kthread in a manner very similar to that implemented by ref_scale_shutdown(). This commit therefore re-implements ref_scale_shutdown in terms of torture_shutdown_init(). The initial draft of this patch was generated by version 2.1.16 of the Claude AI/LLM, but trained and configured for use by my employer, and prompted to refer to Linux-kernel source code. This initial draft failed to provide a forward reference to ref_scale_cleanup(), passed zero to torture_shutdown_init() for an unwelcome insta-shutdown, and failed to pass the kvm.sh --duration argument in as a refscale module parameter. On the other hand, it did catch the need to NULL main_task on the post-test self-shutdown code path, which I might well have forgotten to do. This version of the patch fixes those problems, and in fact very little of the initial draft remains. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
18 lines
447 B
Bash
18 lines
447 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# Torture-suite-dependent shell functions for the rest of the scripts.
|
|
#
|
|
# Copyright (C) IBM Corporation, 2015
|
|
#
|
|
# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
|
|
|
|
# per_version_boot_params bootparam-string config-file seconds
|
|
#
|
|
# Adds per-version torture-module parameters to kernels supporting them.
|
|
per_version_boot_params () {
|
|
echo refscale.shutdown_secs=$3 \
|
|
refscale.verbose=0 \
|
|
$1
|
|
}
|