Re: [PATCH 12/13 v3] ring-buffer: Add cached pages when freeingreader page

From: Steven Rostedt
Date: Fri May 14 2010 - 21:07:14 EST


[ Added Peter Zijlsta since he had an interest in this topic ]

On Fri, 2010-05-14 at 18:26 -0400, Mathieu Desnoyers wrote:
> * Steven Rostedt (rostedt@xxxxxxxxxxx) wrote:

> Trying to understand the effect of splice() putting the page in the page
> cache and how it affects this patch.
>
> Basically, how do you know you can call free_page() from splice() in the
> first place ? Answering this question will probably help us see if this
> page reuse is OK.

Actually, looking at the code, I'm not sure this is safe. I was thinking
that free_page() would always free the page. But I forgot that pages
have a ref count. And a get_page() will prevent a page from freeing.

So I need to revert this patch, or rather, make a core-5 that removes
this patch and fixes the spelling in the comment.

I can later add something that checks the page ref count, but that can
wait till .36.

-- Steve




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/