From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Alexey Korolev <akorolex@gmail.com>
Cc: linux-mm@kvack.org, greg@kroah.com, vijaykumar@bravegnu.org
Subject: Re: Inconsistency (bug) of vm_insert_page with high order allocations
Date: Tue, 2 Jun 2009 08:53:19 +0900 [thread overview]
Message-ID: <20090602085319.e0c23910.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <202cde0e0905292242k313148b8nbc1a47e558f97a1c@mail.gmail.com>
On Sat, 30 May 2009 17:42:35 +1200
Alexey Korolev <akorolex@gmail.com> wrote:
> Kame San,
>
> Thank you for your answers. I've decided to use split_pages function.
> >
> > - write a patch for adding alloc_page_exact_nodemask() // this is not difficult.
> > - explain why you need this.
> > - discuss.
> >
> Writing the patch is not dificult - but it will be hard to explain why
> it is necessary in kernel...
> > IMHO, considering other mmap/munmap/zap_pte, etc... page_count() and page_mapocunt()
> > should be controlled per pte. Then, you'll have to map pages one by one.
> >
> This is quite interesting. I tried to understand this code but it is
> much complicated. I clearly understand why pages have to be mapped one
> by one. By I don't understand how counters relate to this. (it is just
> a curiosity question - I won't be upset if no one answer it)
>
The kernel/cpu cannot handle changes to multiple ptes/TLBs at once. Then,
if mapcount/count is not per pte, there will be "partially mapped/unmapped" racy
state. That's a bad and we'll need a complicated synchronization technique to
map/unmap multiple ptes/TLBs at once. It seems impossible.(and not worth to try)
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-06-03 16:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-28 5:07 Alexey Korolev
[not found] ` <20090528143524.e8a2cde7.kamezawa.hiroyu@jp.fujitsu.com>
2009-05-28 7:02 ` Alexey Korolev
[not found] ` <20090528162108.a6adcc36.kamezawa.hiroyu@jp.fujitsu.com>
2009-05-30 5:42 ` Alexey Korolev
2009-06-01 23:53 ` KAMEZAWA Hiroyuki [this message]
2009-05-28 9:59 ` Mel Gorman
2009-05-30 5:27 ` Alexey Korolev
2009-06-02 8:38 ` Mel Gorman
2009-06-03 5:58 ` Alexey Korolev
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=20090602085319.e0c23910.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akorolex@gmail.com \
--cc=greg@kroah.com \
--cc=linux-mm@kvack.org \
--cc=vijaykumar@bravegnu.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