From: "Adam Litke" <aglitke@gmail.com>
To: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>, agl@us.ibm.com
Subject: Re: [PATCH] spinlock in function hugetlb_fault could be deleted
Date: Mon, 23 Jul 2007 09:27:06 -0500 [thread overview]
Message-ID: <a0a62dfc0707230727r3d9b5f18i69156073e6e6d4a5@mail.gmail.com> (raw)
In-Reply-To: <1185178727.4688.63.camel@ymzhang>
Hello. hugetlb_instantiation_mutex is an extremely heavy-weight lock
whose days are numbered (hopefully). It exists primarily to arbitrate
a race condition where n (n > 1) threads of execution race to satisfy
the same page fault for a process. Even though only one hugetlb page
is needed, if (n) are not available, the application can receive a
bogus VM_FAULT_OOM.
Anyway, the hugetlb_instantiation_mutex approach has few friends
around here, so rather than making the code rely more heavily upon it,
perhaps you could focus you efforts on helping us remove it.
On 7/23/07, Zhang, Yanmin <yanmin_zhang@linux.intel.com> wrote:
> Function hugetlb_fault needn't hold spinlock mm->page_table_lock,
> because when hugetlb_fault is called:
> 1) mm->mmap_sem is held already;
> 2) hugetlb_instantiation_mutex is held by hugetlb_fault, which prevents
> other threads/processes from entering this critical area. It's impossible
> for other threads/processes to change the page table now.
--
Adam Litke ( agl at us.ibm.com )
IBM Linux Technology Center
next prev parent reply other threads:[~2007-07-23 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-23 8:18 Zhang, Yanmin
2007-07-23 9:59 ` Zhang, Yanmin
2007-07-23 14:27 ` Adam Litke [this message]
2007-07-24 0:03 ` Zhang, Yanmin
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=a0a62dfc0707230727r3d9b5f18i69156073e6e6d4a5@mail.gmail.com \
--to=aglitke@gmail.com \
--cc=agl@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yanmin_zhang@linux.intel.com \
/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®