From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "'Kirill A. Shutemov'" <kirill@shutemov.name>
Cc: "'Kirill A. Shutemov'" <kirill.shutemov@linux.intel.com>,
'Vegard Nossum' <vegard.nossum@oracle.com>,
'Andrew Morton' <akpm@linux-foundation.org>,
linux-mm@kvack.org
Subject: RE: [PATCH] mm: fail prefaulting if page table allocation fails
Date: Fri, 29 Jul 2016 16:40:56 +0800 [thread overview]
Message-ID: <022d01d1e974$ece0ab00$c6a20100$@alibaba-inc.com> (raw)
In-Reply-To: <20160729083115.GA24577@node.shutemov.name>
> > In filemap_map_pages()
> > CPU0 CPU1
> > trylock_page at offset_A trylock_page at offset_A
> > goto offset_A+1
> > if (!fe->pte) {
> > alloc pte
> > map pte
> > lock pte
> > }
> > handle offset_A with ptl held handle offset_A+1 without acquiring ptl
>
> I still don't see where's the problem.
>
> On the seond iteration (for offset_A+1), CPU1 would go into
> alloc_set_pte() and as its fe->pte is NULL pte_alloc_one_map() would map
> and lock the pte table allocated by CPU0.
>
Ah, you are right. I missed the 2nd fe!
thanks
Hillf
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-07-29 8:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <01fa01d1e94c$4be09210$e3a1b630$@alibaba-inc.com>
2016-07-29 8:00 ` Hillf Danton
2016-07-29 8:10 ` Kirill A. Shutemov
2016-07-29 8:23 ` Hillf Danton
2016-07-29 8:31 ` Kirill A. Shutemov
2016-07-29 8:40 ` Hillf Danton [this message]
2016-07-28 12:15 Vegard Nossum
2016-07-28 12:21 ` Kirill A. Shutemov
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='022d01d1e974$ece0ab00$c6a20100$@alibaba-inc.com' \
--to=hillf.zj@alibaba-inc.com \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-mm@kvack.org \
--cc=vegard.nossum@oracle.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