From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Tue, 28 Feb 2012 04:20:22 +0700 Subject: Replacing a page in page_cache In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Feb 27, 2012 at 20:41, Jack David wrote: > 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? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com