LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pingfan Liu <piliu@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Pingfan Liu <kernelfans@gmail.com>,
linux-kernel@vger.kernel.org, Petr Mladek <pmladek@suse.com>,
Wang Qing <wangqing@vivo.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Santosh Sivaraj <santosh@fossix.org>,
Sumit Garg <sumit.garg@linaro.org>, Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 2/5] kernel/watchdog_hld: clarify the condition in hardlockup_detector_event_create()
Date: Thu, 16 Sep 2021 11:47:07 +0800 [thread overview]
Message-ID: <YUK+O0QI4o0CoVeT@piliu.users.ipa.redhat.com> (raw)
In-Reply-To: <20210914210627.c92374b3726a22014b359dbd@linux-foundation.org>
On Tue, Sep 14, 2021 at 09:06:27PM -0700, Andrew Morton wrote:
> On Wed, 15 Sep 2021 11:51:00 +0800 Pingfan Liu <kernelfans@gmail.com> wrote:
>
> > hardlockup_detector_event_create() indirectly calls
> > kmem_cache_alloc_node(), which is blockable.
> >
> > So here, the really planned context is is_percpu_thread().
> >
> > ...
> >
> > --- a/kernel/watchdog_hld.c
> > +++ b/kernel/watchdog_hld.c
> > @@ -165,10 +165,13 @@ static void watchdog_overflow_callback(struct perf_event *event,
> >
> > static int hardlockup_detector_event_create(void)
> > {
> > - unsigned int cpu = smp_processor_id();
> > + unsigned int cpu;
> > struct perf_event_attr *wd_attr;
> > struct perf_event *evt;
> >
> > + /* This function plans to execute in cpu bound kthread */
> > + BUG_ON(!is_percpu_thread());
>
> Can we avoid adding the BUG()? Find a way to emit a WARNing and then
> permit the kernel to continue?
>
Yes, WARN_ON() can work in this case.
Thanks,
Pingfan
next prev parent reply other threads:[~2021-09-16 3:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 3:50 [PATCH 0/5] watchdog_hld cleanup and async model for arm64 Pingfan Liu
2021-09-15 3:50 ` [PATCH 1/5] kernel/watchdog: remove useless WATCHDOG_DEFAULT Pingfan Liu
2021-09-15 3:51 ` [PATCH 2/5] kernel/watchdog_hld: clarify the condition in hardlockup_detector_event_create() Pingfan Liu
2021-09-15 4:06 ` Andrew Morton
2021-09-16 3:47 ` Pingfan Liu [this message]
2021-09-15 13:45 ` Peter Zijlstra
2021-09-16 3:57 ` Pingfan Liu
2021-09-16 8:02 ` Petr Mladek
2021-09-17 15:08 ` Pingfan Liu
2021-09-15 3:51 ` [PATCH 3/5] kernel/watchdog: adapt the watchdog_hld interface for async model Pingfan Liu
2021-09-15 14:02 ` Peter Zijlstra
2021-09-16 3:07 ` Pingfan Liu
2021-09-16 8:29 ` Petr Mladek
2021-09-16 8:36 ` Petr Mladek
2021-09-17 15:41 ` Pingfan Liu
2021-09-20 8:20 ` Petr Mladek
2021-09-22 4:26 ` Pingfan Liu
2021-09-17 14:43 ` Pingfan Liu
2021-09-15 3:51 ` [PATCH 4/5] kernel/watchdog_hld: simplify the detecting of hld watchdog Pingfan Liu
2021-09-15 3:51 ` [PATCH 5/5] arm64/watchdog_hld: enable hard lockup on arm64 platform Pingfan Liu
2021-09-17 15:11 ` Pingfan Liu
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=YUK+O0QI4o0CoVeT@piliu.users.ipa.redhat.com \
--to=piliu@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=santosh@fossix.org \
--cc=sumit.garg@linaro.org \
--cc=wangqing@vivo.com \
--cc=will@kernel.org \
--subject='Re: [PATCH 2/5] kernel/watchdog_hld: clarify the condition in hardlockup_detector_event_create()' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).