From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Byungchul Park <byungchul@sk.com>, Theodore Ts'o <tytso@mit.edu>
Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Linux Memory Management List <linux-mm@kvack.org>,
linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
max.byungchul.park@sk.com,
Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>,
kernel_team@skhynix.com
Subject: Re: Possible circular dependency between i_data_sem and folio lock in ext4 filesystem
Date: Fri, 12 Jul 2024 23:23:36 +0200 [thread overview]
Message-ID: <e71f73d5-4dbc-4194-9409-6daf807cb27e@kernel.org> (raw)
In-Reply-To: <20240712053150.GA68384@system.software.com>
On 7/12/24 7:31 AM, Byungchul Park wrote:
> On Fri, Jul 12, 2024 at 01:44:20PM +0900, Byungchul Park wrote:
>>
>> What a funny guy... He did neither 1) insisting it's a bug in your code
>> nor 3) insisting DEPT is a great tool, but just asking if there's any
>> locking rules based on the *different acqusition order* between folio
>> lock and i_data_sem that he observed anyway.
>>
>> I don't think you are a guy who introduces bugs, but the thing is it's
>> hard to find a *document* describing locking rules. Anyone could get
>> fairly curious about the different acquisition order. It's an open
>> source project. You are responsible for appropriate document as well.
>>
>> I don't understand why you act to DEPT like that by the way. You don't
>> have to becasue:
>>
>> 1. I added the *EXPERIMENTAL* tag in Kconfig as you suggested, which
>> will prevent autotesting until it's considered stable. However,
>> the report from DEPT can be a good hint to someone.
>>
>> 2. DEPT can locate code where needs to be documented even if it's not
>> a real bug. It could even help better documentation.
>>
>> DEPT hurts neither code nor performance unless enabling it.
enabling means building with CONFIG_DEPT right?
>> > If you want to add lock annotations into the struct page or even
>> > struct folio, I cordially invite you to try running that by the mm
>> > developers, who will probably tell you why that is a terrible idea
>> > since it bloats a critical data structure.
I doubt anyone will object making struct page larger for a non-production
debugging config option, which AFAIU DEPT is, i.e. in the same area as
LOCKDEP or KASAN etc... I can see at least KMSAN already adds some fields to
struct page already.
>> I already said several times. Doesn't consume struct page.
>
> Sorry for that. I've changed the code so the current version consumes
> it by about two words if enabled. I can place it to page_ext as before
> if needed.
page_ext is useful if you have a debugging feature that can be compiled in
but adds no overhead (memory, nor cpu thanks to static keys) unless enabled
on boot time, i.e. page_owner... so for DEPT it seems it would be an
unnecessary complication.
> Byungchul
>
next prev parent reply other threads:[~2024-07-12 21:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 12:07 Possible circular dependency between i_data_sem and folio lock in ext4 filesystem Hyeonggon Yoo
[not found] ` <20240711153846.GG10452@mit.edu>
2024-07-12 4:44 ` Byungchul Park
2024-07-12 5:31 ` Byungchul Park
2024-07-12 21:23 ` Vlastimil Babka (SUSE) [this message]
2024-07-15 10:32 ` Byungchul Park
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=e71f73d5-4dbc-4194-9409-6daf807cb27e@kernel.org \
--to=vbabka@kernel.org \
--cc=42.hyeyoo@gmail.com \
--cc=byungchul@sk.com \
--cc=gwan-gyeong.mun@intel.com \
--cc=kernel_team@skhynix.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=max.byungchul.park@sk.com \
--cc=tytso@mit.edu \
/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).