Thread (3 messages) 3 messages, 2 authors, 2012-02-28

Replacing a page in page_cache

From: Jack David <hidden>
Date: 2012-02-28 06:17:18

On Tue, Feb 28, 2012 at 2:50 AM, Mulyadi Santosa
[off-list ref] wrote:
On Mon, Feb 27, 2012 at 20:41, Jack David [off-list ref] wrote:
quoted
Hi All,

I am trying to replace a page which is already present in page_cache.
Is there any direct way to do so (via some kernel API)? ?My experiment
is something like, I have a file opened and read completely in user
space app (just to make sure that all the file is present in page
cache). From kernel, I am allocating a new page, filling some data
into it, and want to store this data by replacing some existing page
from page_cache.
sounds like what you want to do is like normal mmap in user space and
then write new data into it?
Actually I want to share the pages (present in page cache) between two
files. I want to avoid memcopy in kernel as much as possible. I am
going through the mmap implementation in kernel but not able to
understand how it can help me in my scenario.

J
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help