From: Hiroaki Wakabayashi <primulaelatior@gmail.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Minchan Kim <minchan.kim@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm@kvack.org, Paul Menage <menage@google.com>,
Ying Han <yinghan@google.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Lee Schermerhorn <lee.schermerhorn@hp.com>
Subject: Re: [PATCH] mm: make munlock fast when mlock is canceled by sigkill
Date: Tue, 25 Aug 2009 13:46:19 +0900 [thread overview]
Message-ID: <82e12e5f0908242146uad0f314hcbb02fcc999a1d32@mail.gmail.com> (raw)
In-Reply-To: <2f11576a0908232113w71676aatf22eb6d431501fd0@mail.gmail.com>
Thank you for reviews.
>>> > @@ -254,6 +254,7 @@ static inline void
>>> > mminit_validate_memmodel_limits(unsigned long *start_pfn,
>>> > #define GUP_FLAGS_FORCE 0x2
>>> > #define GUP_FLAGS_IGNORE_VMA_PERMISSIONS 0x4
>>> > #define GUP_FLAGS_IGNORE_SIGKILL 0x8
>>> > +#define GUP_FLAGS_ALLOW_NULL 0x10
>>> >
>>>
>>> I am worried about adding new flag whenever we need it.
>>> But I think this case makes sense to me.
>>> In addition, I guess ZERO page can also use this flag.
>>>
>>> Kame. What do you think about it?
>>>
>> I do welcome this !
>> Then, I don't have to take care of mlock/munlock in ZERO_PAGE patch.
>>
>> And without this patch, munlock() does copy-on-write just for unpinning memory.
>> So, this patch shows some right direction, I think.
>>
>> One concern is flag name, ALLOW_NULL sounds not very good.
>>
>> GUP_FLAGS_NOFAULT ?
>>
>> I wonder we can remove a hack of FOLL_ANON for core-dump by this flag, too.
>
> Yeah, GUP_FLAGS_NOFAULT is better.
Me too.
I will change this flag name.
> Plus, this patch change __get_user_pages() return value meaning IOW.
> after this patch, it can return following value,
>
> return value: 3
> pages[0]: hoge-page
> pages[1]: null
> pages[2]: fuga-page
>
> but, it can be
>
> return value: 2
> pages[0]: hoge-page
> pages[1]: fuga-page
>
> no?
I did misunderstand mean of get_user_pages()'s return value.
When I try to change __get_user_pages(), I got problem.
If remove NULLs from pages,
__mlock_vma_pages_range() cannot know how long __get_user_pages() readed.
So, I have to get the virtual address of the page from vma and page.
Because __mlock_vma_pages_range() have to call
__get_user_pages() many times with different `start' argument.
I try to use page_address_in_vma(), but it failed.
(page_address_in_vma() returned -EFAULT)
I cannot find way to solve this problem.
Are there good ideas?
Please give me some ideas.
Thanks.
--
Hiroaki Wakabayashi
--
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-08-25 23:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-22 16:54 Hiroaki Wakabayashi
2009-08-24 1:44 ` Minchan Kim
2009-08-24 1:51 ` KAMEZAWA Hiroyuki
2009-08-24 2:23 ` Minchan Kim
2009-08-24 4:13 ` KOSAKI Motohiro
2009-08-25 4:46 ` Hiroaki Wakabayashi [this message]
2009-08-25 5:39 ` Minchan Kim
2009-08-25 9:03 ` Hugh Dickins
2009-08-25 9:37 ` KAMEZAWA Hiroyuki
2009-08-25 11:46 ` Minchan Kim
2009-08-26 2:32 ` KOSAKI Motohiro
2009-08-26 11:11 ` Hiroaki Wakabayashi
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=82e12e5f0908242146uad0f314hcbb02fcc999a1d32@mail.gmail.com \
--to=primulaelatior@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=menage@google.com \
--cc=minchan.kim@gmail.com \
--cc=penberg@cs.helsinki.fi \
--cc=yinghan@google.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