From: Joel Fernandes <joel@joelfernandes.org>
To: Uladzislau Rezki <urezki@gmail.com>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
Zhen Lei <thunder.leizhen@huaweicloud.com>,
rcu@vger.kernel.org, Zqiang <qiang.zhang1211@gmail.com>,
stable@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v3 1/2] mm/vmalloc: Add a safer version of find_vm_area() for debug
Date: Fri, 8 Sep 2023 00:18:05 +0000 [thread overview]
Message-ID: <20230908001805.GA4088026@google.com> (raw)
In-Reply-To: <ZPmWnGG9b0JXsR54@pc636>
On Thu, Sep 07, 2023 at 11:23:40AM +0200, Uladzislau Rezki wrote:
> On Thu, Sep 07, 2023 at 08:11:48AM +0100, Lorenzo Stoakes wrote:
[..]
> > Anyway, so TL;DR:-
> >
> > 1. As we both agree, add a comment to explain why you need the spin trylock.
> > (there are no further steps :P)
> >
> > And I don't believe this actually needs any further changes after this
> > discussion*, so if you fancy doing a follow up to that effect that will
> > suffice for me thanks!
Thanks.
> For PREEMPT_RT kernels we are not allowed to use "vmap parts" in non
> slepable context, this is just reality, because we use a sleep type of
> spinlock.
>
> I am not sure how urgent we need this fix. But to me it looks like
> debuging and corner case. Probably i am wrong and miss something.
> But if it is correct, i would just bailout for RT kernel and rework
> later in a more proper way. For example implement a safe way of RCU
> scan but this is also another story.
Bailing out for RT kernel is insufficient, as we need the trylock() to avoid
self-deadlock as well for !PREEMPT_RT. Plus IIRC in the past there was a
opposition to special-casing PREEMPT_RT in code as well. Admittedly those
PREEMPT_RT cases were related to detecting preempt-disabled than a lock-held
section though.
We could optionally do a trylock() loop + bail out after certain number of
tries as well but that would compilicate the code a bit more and I am not
sure if it is worth it. Still if you guys feel strongly about doing something
like that, let me know and I can give it a try :).
thanks,
- Joel
next prev parent reply other threads:[~2023-09-08 0:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 18:08 Joel Fernandes (Google)
2023-09-04 18:08 ` [PATCH v3 2/2] rcu: Dump vmalloc memory info safely Joel Fernandes (Google)
2023-09-05 7:00 ` Lorenzo Stoakes
2023-09-05 11:48 ` Joel Fernandes
2023-09-06 19:18 ` Lorenzo Stoakes
2023-09-07 7:10 ` Vlastimil Babka
2023-09-08 0:26 ` Joel Fernandes
2023-09-05 7:09 ` [PATCH v3 1/2] mm/vmalloc: Add a safer version of find_vm_area() for debug Lorenzo Stoakes
2023-09-05 11:47 ` Joel Fernandes
2023-09-06 19:23 ` Lorenzo Stoakes
2023-09-06 19:46 ` Lorenzo Stoakes
2023-09-06 22:46 ` Joel Fernandes
2023-09-07 7:11 ` Lorenzo Stoakes
2023-09-07 9:23 ` Uladzislau Rezki
2023-09-08 0:18 ` Joel Fernandes [this message]
2023-09-07 6:53 ` Vlastimil Babka
2023-09-08 0:47 ` Joel Fernandes
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=20230908001805.GA4088026@google.com \
--to=joel@joelfernandes.org \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=paulmck@kernel.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thunder.leizhen@huaweicloud.com \
--cc=urezki@gmail.com \
--cc=vbabka@suse.cz \
/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