From: David Hunter <david.hunter.linux@gmail.com>
To: Clint George <clintbgeorge@gmail.com>
Cc: linux-kernel-mentees@lists.linux.dev, skhan@linuxfoundation.org
Subject: Re: [PATCH] hangcheck-timer: use pr_crit and fix coding style
Date: Wed, 22 Oct 2025 08:24:44 -0400 [thread overview]
Message-ID: <08e6cffa-d515-4692-b633-6780fbdbe64d@gmail.com> (raw)
In-Reply-To: <20251018160010.12215-1-clintbgeorge@gmail.com>
On 10/18/25 12:00, Clint George wrote:
> Testing:
> - Verified timer firing and margin detection using "hangtest" module that i created (I will paste the code below for reference) and checked dmesg logs for expected output: "Hangcheck: hangcheck value past margin!".
> - Used Static Analysis tools
> - Ensured module builds and inserts cleanly after changes.
>
> Let me know if you want me to do more testing on this module.
>
> [] hangtest.c (testing module i created to test hangcheck-timer module):
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Clint George");
> MODULE_DESCRIPTION("Hang test for testing hangcheck-timer");
>
> static int hang_duration = 20;
> module_param(hang_duration, int, 0644);
>
> static int __init hangtest_init(void) {
> unsigned long timeout;
>
> printk(KERN_INFO "hangtest: Disabling interrupts for %d seconds...\n", hang_duration);
>
> local_irq_disable();
> preempt_disable();
>
> timeout = jiffies + (hang_duration * HZ);
> while (time_before(jiffies, timeout)) {
> cpu_relax();
> barrier();
> }
>
> preempt_enable();
> local_irq_enable();
>
> printk(KERN_INFO "hangtest: Interrupts re-enabled\n");
> // return 0;
> return -EINVAL; // Return error so module doesn't stay loaded
> }
>
> static void __exit hangtest_exit(void) {
> printk(KERN_INFO "hangtest: Exit\n");
> }
>
> module_init(hangtest_init);
> module_exit(hangtest_exit);
Well done for describing the testing you did, but try to put it in the
change log. As of now, it is in the commit message, which means that if
your patch is committed, people using git log, would be able to see all
of this, but this is something that is only needed for the maintainers,
not for future code viewers.
Plus, they can always recreate your patch if they need to.
Thanks,
David Hunter
next prev parent reply other threads:[~2025-10-22 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 16:00 [PATCH] hangcheck-timer: use pr_crit and fix coding style Clint George
2025-10-22 12:24 ` David Hunter [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-11-05 14:05 Clint George
2025-11-06 7:51 ` Greg KH
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=08e6cffa-d515-4692-b633-6780fbdbe64d@gmail.com \
--to=david.hunter.linux@gmail.com \
--cc=clintbgeorge@gmail.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=skhan@linuxfoundation.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