[PATCH 1/2] kernel/hung_task: Exporting sysctl_hung_task_timeout_secs

Lucas De Marchi lucas.demarchi at intel.com
Thu Feb 24 16:33:22 UTC 2022


On Thu, Feb 24, 2022 at 01:22:02AM +0530, Ramalingam C wrote:
>Exporting sysctl_hung_task_timeout_secs, to make it available for other
>kernel modules.

I guess this should only be done if second patch is accepted by sound
subsystem maintainers. If it is, then I'd do some changes in the commit
message.

Please use imperative style in commit messages. Here we also need to
give more details on why we are exporting this and Cc the maintainers.
Proposed new message:

Subject: kernel/hung_task: Export sysctl_hung_task_timeout_secs

Kernel modules may want to read sysctl_hung_task_timeout_secs so they
can do long waits by multiples of that value, avoiding the hung task
detector to trigger. This is already done in other places in the kernel
that are builtin-only, like:

	block/bio.c:submit_bio_wait()
	block/blk-mq.c:blk_execute_rq()
	mm/kfence/core.c:toggle_allocation_gate()

Export it so it can also be used by modules.

Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Luis Chamberlain <mcgrof at kernel.org>
Cc: Kai Vehmanen <kai.vehmanen at intel.com>
Cc: Jaroslav Kysela <perex at perex.cz> 
Cc: Takashi Iwai <tiwai at suse.com>

>
>Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
>cc: Lucas De Marchi <lucas.demarchi at intel.com>

Acked-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> kernel/hung_task.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/kernel/hung_task.c b/kernel/hung_task.c
>index db59b6d4f0e7..01120265395d 100644
>--- a/kernel/hung_task.c
>+++ b/kernel/hung_task.c
>@@ -43,6 +43,7 @@ int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
>  * Zero means infinite timeout - no checking done:
>  */
> unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
>+EXPORT_SYMBOL(sysctl_hung_task_timeout_secs);
>
> /*
>  * Zero (default value) means use sysctl_hung_task_timeout_secs:
>-- 
>2.20.1
>


More information about the dri-devel mailing list