kernel-ark/Documentation
David Rientjes 2da02997e0 mm: add dirty_background_bytes and dirty_bytes sysctls
This change introduces two new sysctls to /proc/sys/vm:
dirty_background_bytes and dirty_bytes.

dirty_background_bytes is the counterpart to dirty_background_ratio and
dirty_bytes is the counterpart to dirty_ratio.

With growing memory capacities of individual machines, it's no longer
sufficient to specify dirty thresholds as a percentage of the amount of
dirtyable memory over the entire system.

dirty_background_bytes and dirty_bytes specify quantities of memory, in
bytes, that represent the dirty limits for the entire system.  If either
of these values is set, its value represents the amount of dirty memory
that is needed to commence either background or direct writeback.

When a `bytes' or `ratio' file is written, its counterpart becomes a
function of the written value.  For example, if dirty_bytes is written to
be 8096, 8K of memory is required to commence direct writeback.
dirty_ratio is then functionally equivalent to 8K / the amount of
dirtyable memory:

	dirtyable_memory = free pages + mapped pages + file cache

	dirty_background_bytes = dirty_background_ratio * dirtyable_memory
		-or-
	dirty_background_ratio = dirty_background_bytes / dirtyable_memory

		AND

	dirty_bytes = dirty_ratio * dirtyable_memory
		-or-
	dirty_ratio = dirty_bytes / dirtyable_memory

Only one of dirty_background_bytes and dirty_background_ratio may be
specified at a time, and only one of dirty_bytes and dirty_ratio may be
specified.  When one sysctl is written, the other appears as 0 when read.

The `bytes' files operate on a page size granularity since dirty limits
are compared with ZVC values, which are in page units.

Prior to this change, the minimum dirty_ratio was 5 as implemented by
get_dirty_limits() although /proc/sys/vm/dirty_ratio would show any user
written value between 0 and 100.  This restriction is maintained, but
dirty_bytes has a lower limit of only one page.

Also prior to this change, the dirty_background_ratio could not equal or
exceed dirty_ratio.  This restriction is maintained in addition to
restricting dirty_background_bytes.  If either background threshold equals
or exceeds that of the dirty threshold, it is implicitly set to half the
dirty threshold.

Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Andrea Righi <righi.andrea@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-06 15:59:03 -08:00
..
ABI mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
accounting .gitignore updates 2008-10-30 11:38:45 -07:00
acpi ACPI: update debug parameter documentation 2008-11-07 21:45:29 -05:00
aoe
arm Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2008-12-29 18:08:11 +00:00
auxdisplay .gitignore updates 2008-10-30 11:38:45 -07:00
blackfin
block Documentation: remove reference to ll_rw_blk.c and moved drivers/block/elevator.c 2008-12-29 08:28:43 +01:00
blockdev Create/use more directory structure in the Documentation/ tree. 2008-11-14 17:28:53 +00:00
cdrom
cgroups freezer_cg: disable writing freezer.state of root cgroup 2008-11-12 17:17:16 -08:00
connector .gitignore updates 2008-10-30 11:38:45 -07:00
console
controllers sched: add hierarchical accounting to cpu accounting controller 2008-11-11 12:13:28 +01:00
cpu-freq doc: Update sh cpufreq documentation. 2008-12-22 18:44:47 +09:00
cpuidle
cris
crypto
development-process
device-mapper
DocBook WAN: syncppp.c is no longer used by any kernel code. Remove it. 2008-11-22 02:49:48 +01:00
driver-model
dvb V4L/DVB (9812): [PATCH] short help for Technisat cards to select the right configuration 2008-12-30 09:38:35 -02:00
early-userspace
fault-injection
fb [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices 2008-12-29 18:00:04 +08:00
filesystems mm: add dirty_background_bytes and dirty_bytes sysctls 2009-01-06 15:59:03 -08:00
firmware_class
frv
hwmon adt7462: new hwmon driver 2008-11-12 17:17:17 -08:00
i2c i2c: The i2c mailing list is moving 2008-10-30 15:55:47 +01:00
i2o
ia64 .gitignore updates 2008-10-30 11:38:45 -07:00
ide
infiniband
input Input: fix the example of an input device driver 2008-11-11 11:41:49 -05:00
ioctl UBI: document UBI ioctls 2008-12-09 15:59:07 +02:00
isdn Rationalise Randy's address a bit 2008-10-30 11:38:47 -07:00
ja_JP HOWTO: Sync patch for jp_JP/HOWTO 2008-10-29 15:03:50 -07:00
kbuild kbuild: document environment variables 2009-01-02 20:43:25 +01:00
kdump powerpc: Support for relocatable kdump kernel 2008-10-22 15:01:22 +11:00
ko_KR
laptops Merge branch 'linus' into test 2008-10-23 00:11:07 -04:00
lguest lguest: move the initial guest page table creation code to the host 2008-12-30 09:26:11 +10:30
m68k
make
mips
mn10300
mtd
namespaces
netlabel
networking dccp ccid-2: Phase out the use of boolean Ack Vector sysctl 2008-12-08 01:19:06 -08:00
parisc
PCI Create/use more directory structure in the Documentation/ tree. 2008-11-14 17:28:53 +00:00
pcmcia .gitignore updates 2008-10-30 11:38:45 -07:00
power
powerpc gianfar: Convert gianfar to an of_platform_driver 2008-12-16 15:29:15 -08:00
prctl
RCU Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
s390
scheduler Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:27:58 -08:00
scsi [SCSI] cxgb3i: Add cxgb3i iSCSI driver. 2008-12-30 10:45:33 -06:00
serial Create/use more directory structure in the Documentation/ tree. 2008-11-14 17:28:53 +00:00
sh sh: Kill off remaining CONFIG_SH_KGDB bits. 2008-12-22 18:44:05 +09:00
sound Merge branch 'topic/oxygen' into to-push 2008-12-25 11:40:30 +01:00
sparc
spi spi documentation: use __initdata on struct 2008-12-01 19:55:24 -08:00
sysctl mm: add dirty_background_bytes and dirty_bytes sysctls 2009-01-06 15:59:03 -08:00
telephony
thermal
timers
tracers tracing, doc: update mmiotrace documentation 2008-11-23 20:33:24 +01:00
uml
usb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream 2009-01-02 13:17:13 +00:00
video4linux V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme 2009-01-02 17:13:56 -02:00
vm .gitignore updates 2008-10-30 11:38:45 -07:00
w1 hdq: documentation for OMAP HDQ 2008-11-12 17:17:18 -08:00
watchdog .gitignore updates 2008-10-30 11:38:45 -07:00
x86 Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core 2008-12-23 16:27:23 +01:00
zh_CN
00-INDEX Merge branch 'doc-subdirs' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs 2008-11-15 11:51:03 -08:00
applying-patches.txt
atomic_ops.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
BUG-HUNTING
c2port.txt Add c2 port support 2008-11-12 17:17:18 -08:00
cachetlb.txt
Changes
CodingStyle
cpu-hotplug.txt x86: use possible_cpus=NUM to extend the possible cpus allowed 2008-12-18 12:08:05 +01:00
cpu-load.txt
cpusets.txt container freezer: document the cgroup freezer subsystem. 2008-10-20 08:52:34 -07:00
cputopology.txt sysfs: add documentation to cputopology.txt for system cpumasks 2008-12-19 17:47:12 +10:30
credentials.txt CRED: Documentation 2008-11-14 10:39:26 +11:00
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
DMA-API.txt DMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling 2008-12-01 19:55:24 -08:00
DMA-attributes.txt
DMA-ISA-LPC.txt
DMA-mapping.txt
dontdiff
edac.txt
eisa.txt
email-clients.txt Documentation/email-clients.txt: add some info about gmail 2008-11-06 15:41:19 -08:00
exception.txt
feature-removal-schedule.txt remove ide-scsi 2009-01-02 16:12:51 +01:00
ftrace.txt ftrace: improve documentation 2008-11-28 13:15:14 +01:00
gpio.txt
highuid.txt
HOWTO
hw_random.txt
ics932s401 ics932s401: new clock generator chip driver 2008-11-12 17:17:18 -08:00
initrd.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt io mapping: improve documentation 2008-11-03 18:21:44 +01:00
IO-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 2008-12-28 12:33:21 -08:00
keys-request-key.txt
keys.txt
kobject.txt
kprobes.txt
kref.txt
ldm.txt
leds-class.txt
local_ops.txt documentation: local_ops fix on_each_cpu 2008-12-01 13:51:26 +01:00
lockdep-design.txt
lockstat.txt lockstat: contend with points 2008-10-20 15:43:10 +02:00
logo.gif
logo.txt
magic-number.txt
Makefile
ManagementStyle docs: fix ManagementStyle book name 2008-10-30 11:38:46 -07:00
markers.txt markers: comment marker_synchronize_unregister() on data dependency 2008-11-28 16:47:41 +01:00
mca.txt
md.txt
memory-barriers.txt
memory-hotplug.txt mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
memory.txt
mono.txt
mutex-design.txt
nmi_watchdog.txt x86, nmi-watchdog: update procfs nmi_watchdog file documentation v2 2008-10-30 19:07:04 +01:00
nommu-mmap.txt
numastat.txt
oops-tracing.txt
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt DOC: add printk-formats.txt 2008-11-12 17:17:17 -08:00
prio_tree.txt
rbtree.txt
rfkill.txt rfkill: add master_switch_mode and EPO lock to rfkill and rfkill-input 2008-10-31 19:00:09 -04:00
robust-futex-ABI.txt
robust-futexes.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
SELinux.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
Smack.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt Update stable tree documentation 2008-10-29 15:03:49 -07:00
SubmitChecklist
SubmittingDrivers
SubmittingPatches
svga.txt
sysfs-rules.txt
sysrq.txt Merge branch 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-20 13:19:56 -07:00
tracepoints.txt tracepoints: Documentation TPPROTO misspelt in Documentation/tracepoints.txt 2008-11-29 15:13:42 +01:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
VGA-softcursor.txt
video-output.txt
volatile-considered-harmful.txt Documentation cleanup: trivial misspelling, punctuation, and grammar corrections. 2008-07-26 12:00:06 -07:00
voyager.txt
zorro.txt