[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1712081228430.1371-100000@iolanthe.rowland.org>
Date: Fri, 8 Dec 2017 12:35:07 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Byungchul Park <byungchul.park@....com>
cc: Dave Chinner <david@...morbit.com>, Theodore Ts'o <tytso@....edu>,
Matthew Wilcox <willy@...radead.org>,
Matthew Wilcox <mawilcox@...rosoft.com>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
Jens Axboe <axboe@...nel.dk>,
Rehas Sachdeva <aquannie@...il.com>, <linux-mm@...ck.org>,
<linux-fsdevel@...r.kernel.org>,
<linux-f2fs-devel@...ts.sourceforge.net>,
<linux-nilfs@...r.kernel.org>, <linux-btrfs@...r.kernel.org>,
<linux-xfs@...r.kernel.org>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <kernel-team@....com>
Subject: Re: [PATCH v4 72/73] xfs: Convert mru cache to XArray
On Fri, 8 Dec 2017, Byungchul Park wrote:
> I'm sorry to hear that.. If I were you, I would also get
> annoyed. And.. thanks for explanation.
>
> But, I think assigning lock classes properly and checking
> relationship of the classes to detect deadlocks is reasonable.
>
> In my opinion about the common lockdep stuff, there are 2
> problems on it.
>
> 1) Firstly, it's hard to assign lock classes *properly*. By
> default, it relies on the caller site of lockdep_init_map(),
> but we need to assign another class manually, where ordering
> rules are complicated so cannot rely on the caller site. That
> *only* can be done by experts of the subsystem.
>
> I think if they want to get benifit from lockdep, they have no
> choice but to assign classes manually with the domain knowledge,
> or use *lockdep_set_novalidate_class()* to invalidate locks
> making the developers annoyed and not want to use the checking
> for them.
Lockdep's no_validate class is used when the locking patterns are too
complicated for lockdep to understand. Basically, it tells lockdep to
ignore those locks.
The device core uses that class. The tree of struct devices, each with
its own lock, gets used in many different and complicated ways.
Lockdep can't understand this -- it doesn't have the ability to
represent an arbitrarily deep hierarchical tree of locks -- so we tell
it to ignore the device locks.
It sounds like XFS may need to do the same thing with its semaphores.
Alan Stern
Powered by blists - more mailing lists