From: Matthew Wilcox <willy@infradead.org>
To: Zhouyi Zhou <zhouzhouyi@gmail.com>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org, Linux-MM <linux-mm@kvack.org>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Jason Baron <jbaron@akamai.com>, rcu <rcu@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Paul E. McKenney" <paulmck@kernel.org>
Subject: Re: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:256
Date: Sun, 13 Feb 2022 04:09:28 +0000 [thread overview]
Message-ID: <YgiEeHzz4JZFszJD@casper.infradead.org> (raw)
In-Reply-To: <CAABZP2ycCjiZ0CySc2Lgr_DnUfuDf1iagEKnWwNEkVkR9-gADA@mail.gmail.com>
On Sun, Feb 13, 2022 at 11:19:09AM +0800, Zhouyi Zhou wrote:
> I think the key to the problem lies in your attached console.log
> (pasted below), at times 0.014987 and 0.015995, I see there are two
> locks (cpu_hotplug_lock and jump_label_mutex) holded while
> kmem_cache_alloc calls __might_resched (0.023356).
Those are both sleeping locks (a percpu_rwsem and mutex, respectively).
There is no problem with sleeping while holding a mutex or rwsem.
next prev parent reply other threads:[~2022-02-13 4:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 23:05 Paul Menzel
2022-02-12 23:48 ` Paul E. McKenney
2022-02-13 7:39 ` Paul Menzel
2022-02-13 14:45 ` Paul E. McKenney
2022-02-13 17:26 ` Paul Menzel
2022-02-13 3:19 ` Zhouyi Zhou
2022-02-13 4:09 ` Matthew Wilcox [this message]
2022-02-13 4:17 ` Zhouyi Zhou
2022-02-14 9:35 ` Peter Zijlstra
2022-02-14 9:50 ` Christophe Leroy
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=YgiEeHzz4JZFszJD@casper.infradead.org \
--to=willy@infradead.org \
--cc=jbaron@akamai.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=pmenzel@molgen.mpg.de \
--cc=rcu@vger.kernel.org \
--cc=zhouzhouyi@gmail.com \
/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