From: Matthew Wilcox <willy@infradead.org>
To: Hongchen Zhang <zhanghongchen@loongson.cn>
Cc: David Howells <dhowells@redhat.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>,
Steve French <stfrench@microsoft.com>,
Jens Axboe <axboe@kernel.dk>, David Disseldorp <ddiss@suse.de>,
Luis Chamberlain <mcgrof@kernel.org>,
Nick Alcock <nick.alcock@oracle.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v5 2/2] pipe: use __pipe_{lock,unlock} instead of spinlock
Date: Sat, 19 Aug 2023 04:53:03 +0100 [thread overview]
Message-ID: <ZOA8n/uPrkAKg86b@casper.infradead.org> (raw)
In-Reply-To: <b6f395a6-ca81-f107-0a3f-59e8f8d41f9d@loongson.cn>
On Sat, Aug 19, 2023 at 11:28:58AM +0800, Hongchen Zhang wrote:
> Hi David,
>
> On 2023/8/14 pm 4:47, David Howells wrote:
> > Hongchen Zhang <zhanghongchen@loongson.cn> wrote:
> >
> > > - spin_lock_irq(&pipe->rd_wait.lock);
> > > + __pipe_lock(pipe);
> >
> I changed the code and the post_one_notification is not called inside spin
> lock ,please check this patch again.
In remove_watch_from_object(), you moved post_one_notification() before
lock_queue(), but it's still called inside a RCU read-side critical
section, which cannot sleep.
Please test with CONFIG_DEBUG_ATOMIC_SLEEP before you send a new version.
You should probably turn on DEBUG_SPINLOCK, LOCKDEP, DEBUG_MUTEXES
and a few other debug options.
prev parent reply other threads:[~2023-08-19 3:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 1:03 [PATCH v5 1/2] watch_queue: refactor post_one_notification Hongchen Zhang
2023-08-11 1:03 ` [PATCH v5 2/2] pipe: use __pipe_{lock,unlock} instead of spinlock Hongchen Zhang
2023-08-14 8:47 ` David Howells
2023-08-15 6:01 ` Hongchen Zhang
2023-08-19 3:28 ` Hongchen Zhang
2023-08-19 3:53 ` Matthew Wilcox [this message]
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=ZOA8n/uPrkAKg86b@casper.infradead.org \
--to=willy@infradead.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=ddiss@suse.de \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=mcgrof@kernel.org \
--cc=nick.alcock@oracle.com \
--cc=stfrench@microsoft.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zhanghongchen@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).