On Tue, Jul 08, 2003 at 04:41:05PM +0300, Eran Rundstein wrote:
> Hi.
> 
> Wont this result in a greater loss of data, in case a powerbreak occurs?
> What exactly is the kernel caching? Files?

I haven't looked at the actual code, but from basic kernel concepts I'd
expect that the kernel just keeps around copies of pages which are already
on the disk, whether they belong to files or the processes (UNIX used to
have separate caches for this, one of Linux's strength back in the early 
days was that it unified the caches).

The point is that the data is already on the disk, but since there is nothing
better to do with this page in memory the kernel just remembers that if it
will need that page again then it can save a read.

What's interesting to me out of all of this is how to find out which
parts of these numbers are "non-disposable" pages (i.e. pages which
do not have a copy on the disk, or pages which are part of the working set
of the processes). Maybe the "Active:" line of /proc/meminfo? I might take
a look when I get back home (Ahhhh! the benefits of being unemployed :-).

--Amos

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to