linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: Huang Shijie <shijie8@gmail.com>
Cc: linux-mm@kvack.org, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Subject: Re: Does get_user_pages_fast lock the user pages in memory in my case?
Date: Wed, 22 Apr 2009 18:46:52 +0900	[thread overview]
Message-ID: <28c262360904220246q6be8167fxd44fa21936070e4b@mail.gmail.com> (raw)
In-Reply-To: <49EEB46D.90802@gmail.com>

On Wed, Apr 22, 2009 at 3:08 PM, Huang Shijie <shijie8@gmail.com> wrote:
>
>>> I read the kernel code again. In my case ,the kernel will pin the pages
>>> in memory.
>>> I missed function is_page_cache_freeable() in the pageout().
>>>
>>> In my case, is_page_cache_freeable()will return false ,for
>>> page_count(page) is 3 now:
>>> <1> one is from alloc_page_* in page fault.
>>> <2> one is from get_usr_pages()
>>> <3> one is from add_to_swap() in shrink_page_list()
>>>
>>
>> One more, try_to_unmap will call page_cache_release. So, count is 2.
>>
>
> I found I missed something.When code reachs is_page_cache_freeable().
> page_count(page) is 3:
>
> <1> alloc_page_* in page fault . [page count is 1]
> <2> get_usr_pages().             [page count is 2]
> <3> isolate_pages_global()       [page count is 3]
> <4> add_to_swap()                [page count is 4]
> <5> try_to_unmap()               [page count is 3]
>
Yes. It seems you're right.
I missed isolate. ;-;
Thanks for fixing me.

> so it not a bug, just a vicious circle.
>
> Do i miss something?
>
>
>



-- 
Kinds regards,
Minchan Kim

--
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>

  reply	other threads:[~2009-04-22  9:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17  7:01 Does get_user_pages_fast lock the user pages in memory in my case? Huang Shijie
2009-04-18  6:18 ` KOSAKI Motohiro
2009-04-20  2:22   ` Huang Shijie
2009-04-19 23:45 ` Minchan Kim
2009-04-20  2:15   ` Huang Shijie
2009-04-20  2:42     ` Minchan Kim
2009-04-20  3:28       ` Huang Shijie
2009-04-20  3:42         ` KOSAKI Motohiro
2009-04-20  4:53         ` Minchan Kim
2009-04-20  5:05           ` KOSAKI Motohiro
2009-04-20  5:05           ` Huang Shijie
2009-04-20  5:19             ` KOSAKI Motohiro
2009-04-20  5:37               ` Huang Shijie
2009-04-20  7:59                 ` KOSAKI Motohiro
2009-04-20  8:23                   ` Huang Shijie
2009-04-20  9:24                     ` KOSAKI Motohiro
2009-04-20  9:47                       ` Huang Shijie
2009-04-21  1:43                         ` KOSAKI Motohiro
2009-04-21 19:47                         ` Christoph Lameter
2009-04-20  5:24             ` Minchan Kim
2009-04-20  5:42               ` Huang Shijie
2009-04-20  3:57       ` Huang Shijie
2009-04-22  6:08       ` Huang Shijie
2009-04-22  9:46         ` Minchan Kim [this message]
2009-04-20  3:18     ` KOSAKI Motohiro

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=28c262360904220246q6be8167fxd44fa21936070e4b@mail.gmail.com \
    --to=minchan.kim@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=shijie8@gmail.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;
as well as URLs for NNTP newsgroup(s).