From: Qian Cai <cai@lca.pw>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mhocko@kernel.org, sergey.senozhatsky.work@gmail.com,
pmladek@suse.com, rostedt@goodmis.org, peterz@infradead.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/page_isolation: fix a deadlock with printk()
Date: Sat, 5 Oct 2019 21:10:11 -0400 [thread overview]
Message-ID: <D1060F1F-0D5F-4687-AD89-64A5025897FB@lca.pw> (raw)
In-Reply-To: <20191005174423.23f2db80872a9365009f398a@linux-foundation.org>
> On Oct 5, 2019, at 8:44 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> There is no "console_lock". Please be much more specific.
>
>> It is easier to avoid,
>>
>> zone_lock -> console_lock
>>
>> rather than fixing the opposite.
>
> "ease" isn't the main objective. A more important question is "what
> makes sense". We should be able to call printk() from anywhere, any
> time under any conditions. That can't be done 100% but it is the
> objective. printk() should be robust and not being able to call
> printk() while holding zone->lock isn't robust!
>
> btw, this:
>
> : It is unsafe to call printk() while zone->lock was held, i.e.,
> :
> : zone->lock --> console_sem
>
> doesn't make a lot of sense. console_sem is a sleeping lock so
> attempting to acquire it (with down()!) under spinlock is a huge bug.
> Again, please be careful with the descriptions.
Sorry, It is console_owner_lock.
next prev parent reply other threads:[~2019-10-06 1:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 16:42 Qian Cai
2019-10-04 17:47 ` David Hildenbrand
2019-10-04 18:53 ` Qian Cai
2019-10-05 23:29 ` Andrew Morton
2019-10-06 0:10 ` Qian Cai
2019-10-06 0:44 ` Andrew Morton
2019-10-06 1:10 ` Qian Cai [this message]
2019-10-06 1:56 ` Qian Cai
2019-10-06 0:59 ` Qian Cai
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=D1060F1F-0D5F-4687-AD89-64A5025897FB@lca.pw \
--to=cai@lca.pw \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@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