From: Andrew Morton <akpm@osdl.org>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm lock ordering summary
Date: Fri, 25 Jun 2004 18:39:47 -0700 [thread overview]
Message-ID: <20040625183947.44c7e635.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0406260153380.20414-100000@localhost.localdomain>
Hugh Dickins <hugh@veritas.com> wrote:
>
> please add page_map_lock and anon_vma->lock (but where and how many?).
Like this?
There seem to be a few missing bits.
--- 25/mm/filemap.c~lock-ordering-update 2004-06-25 18:37:32.565669464 -0700
+++ 25-akpm/mm/filemap.c 2004-06-25 18:37:32.570668704 -0700
@@ -55,16 +55,17 @@
/*
* Lock ordering:
*
* ->i_mmap_lock (vmtruncate)
* ->private_lock (__free_pte->__set_page_dirty_buffers)
* ->swap_list_lock
* ->swap_device_lock (exclusive_swap_page, others)
* ->mapping->tree_lock
+ * ->page_map_lock() (try_to_unmap_file)
*
* ->i_sem
* ->i_mmap_lock (truncate->unmap_mapping_range)
*
* ->mmap_sem
* ->i_mmap_lock
* ->page_table_lock (various places, mainly in mmap.c)
* ->mapping->tree_lock (arch-dependent flush_dcache_mmap_lock)
@@ -82,16 +83,20 @@
* ->sb_lock (fs/fs-writeback.c)
* ->mapping->tree_lock (__sync_single_inode)
*
* ->page_table_lock
* ->swap_device_lock (try_to_unmap_one)
* ->private_lock (try_to_unmap_one)
* ->tree_lock (try_to_unmap_one)
* ->zone.lru_lock (follow_page->mark_page_accessed)
+ * ->page_map_lock() (page_add_anon_rmap)
+ * ->anon_vma.lock (anon_vma_prepare)
+ * ->inode_lock (zap_pte_range->set_page_dirty)
+ * ->private_lock (zap_pte_range->__set_page_dirty_buffers)
*
* ->task->proc_lock
* ->dcache_lock (proc_pid_lookup)
*/
/*
* Remove a page from the page cache and free it. Caller has to make
* sure the page is locked and that nobody else uses it - or that usage
_
prev parent reply other threads:[~2004-06-26 1:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-25 22:35 [PATCH] anon_vma list locking bug Hugh Dickins
2004-06-25 22:37 ` [PATCH] mm lock ordering summary Hugh Dickins
2004-06-25 23:34 ` Andrew Morton
2004-06-26 0:33 ` Hugh Dickins
2004-06-26 0:41 ` Andrew Morton
2004-06-26 1:22 ` Hugh Dickins
2004-06-26 1:39 ` Andrew Morton [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=20040625183947.44c7e635.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®