* Re: question about do_anonymous_page()
[not found] <38b2ab8a0808080101v795327f0n9da5adb33a3c1a9@mail.gmail.com>
@ 2008-08-08 8:23 ` Francis Moreau
2008-08-08 8:51 ` Hugh Dickins
0 siblings, 1 reply; 3+ messages in thread
From: Francis Moreau @ 2008-08-08 8:23 UTC (permalink / raw)
To: Linux Kernel Mailing List, linux-mm
[ resending with linux-mm address fixed, sorry ]
On Fri, Aug 8, 2008 at 10:01 AM, Francis Moreau <francis.moro@gmail.com> wrote:
> Hello,
>
> I'm wondering why do_anonymous_page() calls lru_cache_add_active(page)
> where page does not belong to the page cache ?
>
> Is it simply because lru_add_active() doesn't exist ?
>
> Thanks
> --
> Francis
>
--
Francis
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about do_anonymous_page()
2008-08-08 8:23 ` question about do_anonymous_page() Francis Moreau
@ 2008-08-08 8:51 ` Hugh Dickins
2008-08-08 9:22 ` Francis Moreau
0 siblings, 1 reply; 3+ messages in thread
From: Hugh Dickins @ 2008-08-08 8:51 UTC (permalink / raw)
To: Francis Moreau; +Cc: Rik van Riel, linux-kernel, linux-mm
On Fri, 8 Aug 2008, Francis Moreau wrote:
> On Fri, Aug 8, 2008 at 10:01 AM, Francis Moreau <francis.moro@gmail.com> wrote:
> >
> > I'm wondering why do_anonymous_page() calls lru_cache_add_active(page)
> > where page does not belong to the page cache ?
> >
> > Is it simply because lru_add_active() doesn't exist ?
Yes.
It just happens that whoever (Rik?) originally named that function was
primarily thinking of the page cache at the time; or perhaps wasn't
thinking of the file page cache at all, just regarding all the pages
we put on that list as cached in some sense.
You're right that it's a little anomalous, but nothing to worry about.
I get more bothered by page_cache_get(), which is and always(?) has
been the same thing as get_page(): sometimes we use one, sometimes
the other, and often we use page_cache_get() on anonymous pages.
Hugh
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: question about do_anonymous_page()
2008-08-08 8:51 ` Hugh Dickins
@ 2008-08-08 9:22 ` Francis Moreau
0 siblings, 0 replies; 3+ messages in thread
From: Francis Moreau @ 2008-08-08 9:22 UTC (permalink / raw)
To: Hugh Dickins; +Cc: Rik van Riel, linux-kernel, linux-mm
On Fri, Aug 8, 2008 at 10:51 AM, Hugh Dickins <hugh@veritas.com> wrote:
>> Is it simply because lru_add_active() doesn't exist ?
>
> Yes.
>
great at least one thing I understood from the kernel mm internals ;)
> It just happens that whoever (Rik?) originally named that function was
> primarily thinking of the page cache at the time; or perhaps wasn't
> thinking of the file page cache at all, just regarding all the pages
> we put on that list as cached in some sense.
>
I think it might be the second reason since the page is not directly
added to the LRU
but to a pagevec structure since the term 'cache'. But IMHO if so,
it's just confusing and
lru_cache_add_active() shouldn't contain implemantation details in its name.
> You're right that it's a little anomalous, but nothing to worry about.
well, it's just that I got confusing when reading the code for the
first time. I really have hard
time to understand it...
> I get more bothered by page_cache_get(), which is and always(?) has
> been the same thing as get_page(): sometimes we use one, sometimes
> the other, and often we use page_cache_get() on anonymous pages.
>
Yes and this is what confused me: lru_cache_add_active() does call
page_cache_get()
for anymous pages, hence my question.
Thanks !
--
Francis
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-08 9:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <38b2ab8a0808080101v795327f0n9da5adb33a3c1a9@mail.gmail.com>
2008-08-08 8:23 ` question about do_anonymous_page() Francis Moreau
2008-08-08 8:51 ` Hugh Dickins
2008-08-08 9:22 ` Francis Moreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox