From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm <linux-mm@kvack.org>
Subject: Re: Question on i_mmap_mutex locking rule
Date: Tue, 10 Apr 2012 15:44:53 +0900 [thread overview]
Message-ID: <4F83D6E5.4080309@jp.fujitsu.com> (raw)
In-Reply-To: <877gxygx11.fsf@skywalker.in.ibm.com>
(2012/04/02 21:04), Aneesh Kumar K.V wrote:
>
> Hi,
>
> I started looking at unmap_hugepage_range. unmap_hugepage_range takes
> i_mmap_mutex. But then the same lock is also taken higher up in the
> stack. ie via the below chain
>
> unmap_mapping_range (i_mmap_mutex)
> -> unmap_mapping_range_tree
> -> unmap_mapping_range_vma
> -> zap_page_range_single
> -> unmap_single_vma
> -> unmap_hugepage_range (i_mmap_mutex)
>
why not deadlock ?
> But there are other code path that doesn't take i_mmap_mutex. For ex:
> -> madvise_dontneed
> -> zap_page_range
> -> unmap_vmas
> -> unmap_single_vma
> -> unmap_page_range
>
>
IIUC, DONTNEED will not change vma layout...so it doesn't require
i_mmap_mutex.
Thanks,
-Kame
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2012-04-10 6:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 12:04 Question on i_mmap_mutex locking rule Aneesh Kumar K.V
2012-04-10 6:44 ` KAMEZAWA Hiroyuki [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=4F83D6E5.4080309@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).