Skip to content

Commit df858fa

Browse files
Christian Ehrhardttorvalds
authored andcommitted
documentation: update how page-cluster affects swap I/O
Fix of the documentation of /proc/sys/vm/page-cluster to match the behavior of the code and add some comments about what the tunable will change in that behavior. Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> Acked-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Minchan Kim <minchan@kernel.org> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3fb5c29 commit df858fa

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎Documentation/sysctl/vm.txt‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,16 +574,24 @@ of physical RAM. See above.
574574

575575
page-cluster
576576

577-
page-cluster controls the number of pages which are written to swap in
578-
a single attempt. The swap I/O size.
577+
page-cluster controls the number of pages up to which consecutive pages
578+
are read in from swap in a single attempt. This is the swap counterpart
579+
to page cache readahead.
580+
The mentioned consecutivity is not in terms of virtual/physical addresses,
581+
but consecutive on swap space - that means they were swapped out together.
579582

580583
It is a logarithmic value - setting it to zero means "1 page", setting
581584
it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
585+
Zero disables swap readahead completely.
582586

583587
The default value is three (eight pages at a time). There may be some
584588
small benefits in tuning this to a different value if your workload is
585589
swap-intensive.
586590

591+
Lower values mean lower latencies for initial faults, but at the same time
592+
extra faults and I/O delays for following faults if they would have been part of
593+
that consecutive pages readahead would have brought in.
594+
587595
=============================================================
588596

589597
panic_on_oom

0 commit comments

Comments
 (0)