From: Andrew Morton <akpm@digeo.com>
To: Nikita Danilov <Nikita@Namesys.COM>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>,
Alexander Viro <viro@math.psu.edu>
Subject: Re: locking rules for ->dirty_inode()
Date: Fri, 20 Sep 2002 09:47:13 -0700 [thread overview]
Message-ID: <3D8B5111.A318D63D@digeo.com> (raw)
In-Reply-To: 15755.19895.544309.44729@laputa.namesys.com
Nikita Danilov wrote:
>
> ...
> Actually, I came over this while trying to describe lock ordering in
> reiser4 after I just started integrating other kernel locks there. I
> wonder, has somebody already done this, writing up kernel lock
> hierarchy, that is?
>
I've been keeping the comment at the top of filemap.c uptodate when
I discover things. It got smaller a while ago when certain rude
locks were spoken to.
Really, this form of representation isn't rich enough, but the
format certainly provides enough info to know when you might be
taking locks in the wrong order, and it tells you where to look
to see them being taken.
The problem with the format is that locks are only mentioned once,
and it can't describe the whole graph. Maybe it needs something
like:
* ->i_shared_lock (vmtruncate)
* ->private_lock (__free_pte->__set_page_dirty_buffers)
* ->swap_list_lock
* ->swap_device_lock (exclusive_swap_page, others)
* ->mapping->page_lock
* ->inode_lock (__mark_inode_dirty)
* ->sb_lock (fs/fs-writeback.c)
+* ->i_shared_lock
+* ->page_table_lock (lots of places)
*/
Don't know. Maybe someone somewhere has developed a notation
for this? How are you doing it?
next prev parent reply other threads:[~2002-09-20 16:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-20 15:00 locking rules for ->dirty_inode() Nikita Danilov
2002-09-20 15:52 ` Andrew Morton
2002-09-20 16:32 ` Nikita Danilov
2002-09-20 16:47 ` Andrew Morton [this message]
2002-09-20 17:32 ` Nikita Danilov
2002-09-20 18:21 ` Hans Reiser
2002-09-20 22:41 ` Andrew Morton
2002-09-23 16:32 ` Nikita Danilov
2002-09-23 16:42 ` Andrew Morton
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=3D8B5111.A318D63D@digeo.com \
--to=akpm@digeo.com \
--cc=Linux-Kernel@Vger.Kernel.ORG \
--cc=Nikita@Namesys.COM \
--cc=viro@math.psu.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