4 * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds 8 * This file contains the default values for the opereation of the 9 * Linux VM subsystem. Finetuning documentation can be found in 10 * linux/Documentation/sysctl/vm.txt. 12 * Swap aging added 23.2.95, Stephen Tweedie. 13 * Buffermem limits added 12.3.98, Rik van Riel. 17 #include <linux/sched.h> 18 #include <linux/head.h> 19 #include <linux/kernel.h> 20 #include <linux/kernel_stat.h> 21 #include <linux/errno.h> 22 #include <linux/string.h> 23 #include <linux/stat.h> 24 #include <linux/swap.h> 26 #include <linux/swapctl.h> 27 #include <linux/pagemap.h> 28 #include <linux/init.h> 31 #include <asm/system.h>/* for cli()/sti() */ 32 #include <asm/uaccess.h>/* for copy_to/from_user */ 33 #include <asm/bitops.h> 34 #include <asm/pgtable.h> 37 * We identify three levels of free memory. We never let free mem 38 * fall below the freepages.min except for atomic allocations. We 39 * start background swapping if we fall below freepages.high free 40 * pages, and we begin intensive swapping below freepages.low. 42 * These values are there to keep GCC from complaining. Actual 43 * initialization is done in mm/page_alloc.c or arch/sparc(64)/mm/init.c. 45 freepages_t freepages
= { 46 48,/* freepages.min */ 47 72,/* freepages.low */ 48 96/* freepages.high */ 51 /* We track the number of pages currently being asynchronously swapped 52 out, so that we don't try to swap TOO many pages out at once */ 53 atomic_t nr_async_pages
=ATOMIC_INIT(0); 56 * Constants for the page aging mechanism: the maximum age (actually, 57 * the maximum "youthfulness"); the quanta by which pages rejuvenate 58 * and age; and the initial age for new pages. 61 swap_control_t swap_control
= { 62 20,3,1,3,/* Page aging */ 63 32,4,/* Aging cluster */ 64 8192,8192,/* Pageout and bufferout weights */ 67 swapstat_t swapstats
= {0}; 69 buffer_mem_t buffer_mem
= { 70 6,/* minimum percent buffer + cache memory */ 71 20,/* borrow percent buffer + cache memory */ 72 90/* maximum percent buffer + cache memory */