LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: Page Cache question
@ 2007-08-05 17:24 Adnan Khaleel
  0 siblings, 0 replies; 9+ messages in thread
From: Adnan Khaleel @ 2007-08-05 17:24 UTC (permalink / raw)
  To: linux-kernel

So would it be possible to me to disable it for just a particular user space process?

Adnan


> I'm looking for a way to disable the page cache for an

> experimental NUMA system running the 2.6.17 kernel. I would prefer to

> only disable the page cache for my process and still have it be enabled

> by the rest of the system. Is there an easy way of doing this?

> Alternatively, I would be fine disabling the Page Cache altogether as well.



All user memory is in the page cache. Without it you could only run kernel

modules.



-Andi

-





       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Page Cache Question
  2007-08-14 10:14 ` Helge Hafting
@ 2007-08-14 14:38   ` Eugene Teo
  0 siblings, 0 replies; 9+ messages in thread
From: Eugene Teo @ 2007-08-14 14:38 UTC (permalink / raw)
  To: Helge Hafting; +Cc: Adnan Khaleel, linux-kernel

<quote sender="Helge Hafting">
> Adnan Khaleel wrote:
>> I'm looking for a way to disable the page cache for an
>> experimental NUMA system running the 2.6.17 kernel. I would prefer to
>> only disable the page cache for my process and still have it be enabled
>> by the rest of the system. Is there an easy way of doing this?
>> Alternatively, I would be fine disabling the Page Cache altogether as 
>> well.
>>   
> Assuming what you really mean is that you don't want to cache
> file i/o for that process - try opening files with O_DIRECT.

You will probably find this tool useful:
http://userweb.kernel.org/~akpm/pagecache-management/

"... a little tool which permits the management of the pagecache usage of
arbitrary applications.  Effectively it prevents the targetted application
from using any pagecache at all."

Eugene

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Page Cache Question
  2007-08-05 16:32 Page Cache Question Adnan Khaleel
  2007-08-05 17:46 ` Tino Keitel
  2007-08-05 18:01 ` Andi Kleen
@ 2007-08-14 10:14 ` Helge Hafting
  2007-08-14 14:38   ` Eugene Teo
  2 siblings, 1 reply; 9+ messages in thread
From: Helge Hafting @ 2007-08-14 10:14 UTC (permalink / raw)
  To: Adnan Khaleel; +Cc: linux-kernel

Adnan Khaleel wrote:
> I'm looking for a way to disable the page cache for an
> experimental NUMA system running the 2.6.17 kernel. I would prefer to
> only disable the page cache for my process and still have it be enabled
> by the rest of the system. Is there an easy way of doing this?
> Alternatively, I would be fine disabling the Page Cache altogether as well.
>   
Assuming what you really mean is that you don't want to cache
file i/o for that process - try opening files with O_DIRECT.

Helge Hafting


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Page Cache Question
  2007-08-05 16:32 Page Cache Question Adnan Khaleel
  2007-08-05 17:46 ` Tino Keitel
@ 2007-08-05 18:01 ` Andi Kleen
  2007-08-14 10:14 ` Helge Hafting
  2 siblings, 0 replies; 9+ messages in thread
From: Andi Kleen @ 2007-08-05 18:01 UTC (permalink / raw)
  To: Adnan Khaleel; +Cc: linux-kernel

Adnan Khaleel <akhaleel2001@yahoo.com> writes:

> I'm looking for a way to disable the page cache for an
> experimental NUMA system running the 2.6.17 kernel. I would prefer to
> only disable the page cache for my process and still have it be enabled
> by the rest of the system. Is there an easy way of doing this?
> Alternatively, I would be fine disabling the Page Cache altogether as well.

All user memory is in the page cache. Without it you could only run kernel
modules.

-Andi

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Page Cache Question
  2007-08-05 16:32 Page Cache Question Adnan Khaleel
@ 2007-08-05 17:46 ` Tino Keitel
  2007-08-05 18:01 ` Andi Kleen
  2007-08-14 10:14 ` Helge Hafting
  2 siblings, 0 replies; 9+ messages in thread
From: Tino Keitel @ 2007-08-05 17:46 UTC (permalink / raw)
  To: linux-kernel

On Sun, Aug 05, 2007 at 09:32:59 -0700, Adnan Khaleel wrote:
> 
> I'm looking for a way to disable the page cache for an
> experimental NUMA system running the 2.6.17 kernel. I would prefer to
> only disable the page cache for my process and still have it be enabled
> by the rest of the system. Is there an easy way of doing this?
> Alternatively, I would be fine disabling the Page Cache altogether as well.

Maybe this helps for you:

http://lwn.net/Articles/224653/

Regards,
Tino

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Page Cache question
       [not found] <fa.ak7dGOAL/3/Q6eQ0zKX2KgaiWdU@ifi.uio.no>
@ 2007-08-05 17:38 ` Robert Hancock
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Hancock @ 2007-08-05 17:38 UTC (permalink / raw)
  To: Adnan Khaleel; +Cc: linux-kernel

Adnan Khaleel wrote:
> So would it be possible to me to disable it for just a particular user space process?

It's the core of the whole VM/memory management subsystem. It's not 
something you can just disable.

It would be better if you explained what exactly you were trying to 
accomplish..

> 
> Adnan
> 
> 
>> I'm looking for a way to disable the page cache for an
> 
>> experimental NUMA system running the 2.6.17 kernel. I would prefer to
> 
>> only disable the page cache for my process and still have it be enabled
> 
>> by the rest of the system. Is there an easy way of doing this?
> 
>> Alternatively, I would be fine disabling the Page Cache altogether as well.
> 
> 
> 
> All user memory is in the page cache. Without it you could only run kernel
> 
> modules.
> 
> 
> 
> -Andi

-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Page Cache Question
@ 2007-08-05 16:32 Adnan Khaleel
  2007-08-05 17:46 ` Tino Keitel
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Adnan Khaleel @ 2007-08-05 16:32 UTC (permalink / raw)
  To: linux-kernel


I'm looking for a way to disable the page cache for an
experimental NUMA system running the 2.6.17 kernel. I would prefer to
only disable the page cache for my process and still have it be enabled
by the rest of the system. Is there an easy way of doing this?
Alternatively, I would be fine disabling the Page Cache altogether as well.



Thanks



AK






       
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: page cache question
  2006-02-27  7:45 page cache question Xin Zhao
@ 2006-02-27  9:03 ` Nick Piggin
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Piggin @ 2006-02-27  9:03 UTC (permalink / raw)
  To: Xin Zhao; +Cc: linux-kernel

Xin Zhao wrote:
> Sorry if this question is dumb.
> 
> Linux uses address_space to identify pages in the page cache. An
> address space is often associated with a memory object such as inode.
> That seems to associate the cached page with that inode. My question
> is: if a file is closed and the inode is destroyed, will the cached
> page be removed from page cache immediately?  If so, does that mean

Yes. The inode's struct address_space contains the radix tree which
indexes the pagecache pages.

> the file system has to load data from disk again if a user promptly
> open and read the same file again? If not, how does linux determine
> when to evict a cached page? using LRU?
> 

Yes they would have to be read again. However in general the inode is
not destroyed after the file is closed -- inodes are cached too.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* page cache question
@ 2006-02-27  7:45 Xin Zhao
  2006-02-27  9:03 ` Nick Piggin
  0 siblings, 1 reply; 9+ messages in thread
From: Xin Zhao @ 2006-02-27  7:45 UTC (permalink / raw)
  To: linux-kernel

Sorry if this question is dumb.

Linux uses address_space to identify pages in the page cache. An
address space is often associated with a memory object such as inode.
That seems to associate the cached page with that inode. My question
is: if a file is closed and the inode is destroyed, will the cached
page be removed from page cache immediately?  If so, does that mean
the file system has to load data from disk again if a user promptly
open and read the same file again? If not, how does linux determine
when to evict a cached page? using LRU?

Thanks in advance for your kind help!

-x

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-08-14 14:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-05 17:24 Page Cache question Adnan Khaleel
     [not found] <fa.ak7dGOAL/3/Q6eQ0zKX2KgaiWdU@ifi.uio.no>
2007-08-05 17:38 ` Robert Hancock
  -- strict thread matches above, loose matches on Subject: below --
2007-08-05 16:32 Page Cache Question Adnan Khaleel
2007-08-05 17:46 ` Tino Keitel
2007-08-05 18:01 ` Andi Kleen
2007-08-14 10:14 ` Helge Hafting
2007-08-14 14:38   ` Eugene Teo
2006-02-27  7:45 page cache question Xin Zhao
2006-02-27  9:03 ` Nick Piggin

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