Two versions of the truth (Documentation/{filesystems/proc.txt,sysctl/vm.txt}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I was looking for a description of the kernel parameter page-cluster
and found two versions that appear to be very different to me.
(see the two text fragments below)

The first one talks about the clusting of pages on a page fault,
when pages need to be read into memory.
The second one talks about the number of pages written to swap in
a single attempt.

Which one is correct?
I'm inclined to choose the first description.
The second one appears to be wrong to me because paged-in pages are
simply evicted from the page cache when need be, they are never
written out to swap. At least, that's what I've always thought.

Can anybody help me out?
Regards,
Toon.

8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

/usr/src/linux-2.6.18-gentoo-r4/Documentation/sysctl/vm.txt:
============================================================
page-cluster:

The Linux VM subsystem avoids excessive disk seeks by reading
multiple pages on a page fault. The number of pages it reads
is dependent on the amount of memory in your machine.

The number of pages the kernel reads in at once is equal to
2 ^ page-cluster. Values above 2 ^ 5 don't make much sense
for swap because we only cluster swap data in 32-page groups.

/usr/src/linux-2.6.18-gentoo-r4/Documentation/filesystems/proc.txt:
===================================================================
page-cluster
------------

page-cluster controls the number of pages which are written to swap
in a single attempt.  The swap I/O size.

It is a logarithmic value - setting it to zero means "1 page",
setting it to 1 means "2 pages", setting it to 2 means "4 pages",
etc.

The default value is three (eight pages at a time).  There may be
some small benefits in tuning this to a different value if your
workload is swap-intensive.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux