linux/Documentation
David Rientjes b813e931b4 smaps: add clear_refs file to clear reference
Adds /proc/pid/clear_refs.  When any non-zero number is written to this file,
pte_mkold() and ClearPageReferenced() is called for each pte and its
corresponding page, respectively, in that task's VMAs.  This file is only
writable by the user who owns the task.

It is now possible to measure _approximately_ how much memory a task is using
by clearing the reference bits with

	echo 1 > /proc/pid/clear_refs

and checking the reference count for each VMA from the /proc/pid/smaps output
at a measured time interval.  For example, to observe the approximate change
in memory footprint for a task, write a script that clears the references
(echo 1 > /proc/pid/clear_refs), sleeps, and then greps for Pgs_Referenced and
extracts the size in kB.  Add the sizes for each VMA together for the total
referenced footprint.  Moments later, repeat the process and observe the
difference.

For example, using an efficient Mozilla:

	accumulated time		referenced memory
	----------------		-----------------
		 0 s				 408 kB
		 1 s				 408 kB
		 2 s				 556 kB
		 3 s				1028 kB
		 4 s				 872 kB
		 5 s				1956 kB
		 6 s				 416 kB
		 7 s				1560 kB
		 8 s				2336 kB
		 9 s				1044 kB
		10 s				 416 kB

This is a valuable tool to get an approximate measurement of the memory
footprint for a task.

Cc: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: David Rientjes <rientjes@google.com>
[akpm@linux-foundation.org: build fixes]
[mpm@selenic.com: rename for_each_pmd]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:52 -07:00
..
ABI USB: add power/level sysfs attribute 2007-04-27 13:28:37 -07:00
DocBook kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs' 2007-05-02 20:58:11 +02:00
RCU
accounting
aoe
arm [ARM] 4238/1: S3C24XX: docs: update suspend and resume 2007-03-02 11:58:58 +00:00
auxdisplay [PATCH] drivers: add LCD support 2007-02-11 10:51:24 -08:00
block
cdrom [PATCH] pktcdvd: cleanup 2007-02-11 10:51:28 -08:00
connector
console
cpu-freq
cris
crypto [CRYPTO] doc: Fix typo in hash example 2007-03-21 08:55:58 +11:00
device-mapper
driver-model DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt 2007-05-02 18:57:59 -07:00
drivers/edac [PATCH] EDAC: Add memory scrubbing controls API to core 2007-02-12 09:48:32 -08:00
dvb
early-userspace
fault-injection
fb [PATCH] fbdev driver for S3 Trio/Virge 2007-02-12 09:48:41 -08:00
filesystems smaps: add clear_refs file to clear reference 2007-05-07 12:12:52 -07:00
firmware_class
fujitsu/frv
hrtimer [PATCH] Add debugging feature /proc/timer_stat 2007-02-16 08:13:59 -08:00
hrtimers [PATCH] hrtimers: move and add documentation 2007-02-16 08:13:58 -08:00
hwmon hwmon/w83627ehf: Add support for the W83627DHG chip 2007-02-14 21:15:04 +01:00
i2c i2c: Documentation update 2007-05-01 23:26:35 +02:00
i2o
i386 [PATCH] x86: add command line length to boot protocol 2007-05-02 19:27:10 +02:00
ia64
infiniband IB/umad: Clarify documentation of transaction ID 2007-04-24 21:30:38 -07:00
input Input: update some documentation 2007-04-29 23:42:08 -04:00
ioctl
isdn [PATCH] drivers/isdn/gigaset: new M101 driver (v2) 2007-02-12 09:48:30 -08:00
kbuild kbuild: small documentation fix in Documentation/kbuild/modules.txt 2007-05-02 20:58:09 +02:00
kdump [PATCH] PPC64 Kdump documentation update 2007-02-20 17:10:15 -08:00
m68k
mips
netlabel
networking [PATCH] bcm43xx: Update Documentation/bcm43xx.txt 2007-04-28 11:00:55 -04:00
parisc
pcmcia add new_id to PCMCIA drivers 2007-05-07 12:12:50 -07:00
power PCI Documentation: power/pci.txt fix copy/paste error 2007-05-02 19:02:35 -07:00
powerpc [POWERPC] Fix typos in booting-without-of.txt 2007-04-27 21:13:14 +10:00
s390 [S390] crypto: cleanup. 2007-04-27 16:01:46 +02:00
scsi [SCSI] aacraid: Correct SMC products in aacraid.txt 2007-04-17 18:01:45 -04:00
serial
sh Fix typos concerning hierarchy 2007-02-17 19:23:03 +01:00
sound [ALSA] hda-codec - Add support for MacBook Pro 1st generation 2007-03-15 12:44:51 +01:00
sparc
spi [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX 2007-04-21 23:14:01 +01:00
sysctl
telephony
uml
usb MAINTAINER change for Connect Tech Inc 2007-05-04 17:41:21 -07:00
video4linux Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2007-04-29 10:47:25 -07:00
vm
w1
watchdog
x86_64 [PATCH] x86-64: Dynamically adjust machine check interval 2007-05-02 19:27:19 +02:00
00-INDEX
BUG-HUNTING
Changes
CodingStyle
DMA-API.txt
DMA-ISA-LPC.txt
DMA-mapping.txt
HOWTO HOWTO: Add a reference to Harbison and Steele 2007-02-07 10:37:13 -08:00
IO-mapping.txt
IPMI.txt
IRQ-affinity.txt
IRQ.txt
MSI-HOWTO.txt
ManagementStyle
PCIEBUS-HOWTO.txt
README.DAC960
README.cycladesZ
SAK.txt
SecurityBugs
SubmitChecklist [PATCH] add -mm testing in SubmitChecklist 2007-03-01 14:53:37 -08:00
SubmittingDrivers
SubmittingPatches Change Linus' email address too 2007-01-23 14:22:35 -08:00
VGA-softcursor.txt
applying-patches.txt
atomic_ops.txt
basic_profiling.txt
binfmt_misc.txt
cachetlb.txt
cciss.txt
cli-sti-removal.txt
computone.txt
cpqarray.txt
cpu-hotplug.txt
cpu-load.txt [PATCH] Documentation: CPU load calculation description 2007-03-01 14:53:39 -08:00
cpusets.txt [PATCH] CPUSETS: add mems to basic usage documentation 2007-04-02 10:06:08 -07:00
cputopology.txt
dcdbas.txt
debugging-modules.txt
dell_rbu.txt
devices.txt
digiepca.txt
dnotify.txt
dontdiff [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff 2007-05-02 19:27:21 +02:00
ecryptfs.txt
eisa.txt
exception.txt
feature-removal-schedule.txt Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-05-04 18:04:29 -07:00
floppy.txt
gpio.txt [PATCH] doc: gpio.txt describes open-drain emulation 2007-04-12 15:31:42 -07:00
hayes-esp.txt
highuid.txt
hpet.txt
hw_random.txt
ide.txt ide: make legacy IDE VLB modules check for the "probe" kernel params (v2) 2007-03-03 17:48:55 +01:00
initrd.txt
io_ordering.txt
ioctl-number.txt [PATCH] Doc: isicom, remove reserved ioctl-number 2007-02-11 10:51:29 -08:00
iostats.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt [PATCH] Discuss a couple common errors in kernel-doc usage. 2007-02-11 10:51:32 -08:00
kernel-docs.txt Documentation/kernel-docs.txt update. 2007-02-17 20:15:38 +01:00
kernel-parameters.txt [PATCH] i386: PARAVIRT: Allow boot-time disable of paravirt_ops patching 2007-05-02 19:27:16 +02:00
keys-request-key.txt
keys.txt [AF_RXRPC]: Key facility changes for AF_RXRPC 2007-04-26 15:46:23 -07:00
kobject.txt
kprobes.txt
kref.txt
laptop-mode.txt
ldm.txt
leds-class.txt
local_ops.txt [PATCH] local_t: Documentation 2007-02-11 10:51:32 -08:00
lockdep-design.txt
locks.txt
logo.gif
logo.txt
magic-number.txt [SPARC]: Remove the broken SUN_AURORA driver. 2007-02-26 11:35:45 -08:00
mandatory.txt
mca.txt
md.txt
memory-barriers.txt
memory.txt
mono.txt
moxa-smartio
mtrr.txt
mutex-design.txt
nbd.txt
nfsroot.txt [PATCH] fix the defaults mentioned in Documentation/nfsroot.txt 2007-02-12 09:48:28 -08:00
nmi_watchdog.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt [PATCH] update Doc/oops-tracing.txt for TAINT_USER 2007-02-20 17:10:15 -08:00
paride.txt
parport-lowlevel.txt
parport.txt
pci-error-recovery.txt
pci.txt PCI: the overdue removal of pci_module_init() 2007-05-02 19:02:38 -07:00
pcieaer-howto.txt
pi-futex.txt
pm.txt
pnp.txt
preempt-locking.txt
prio_tree.txt
ramdisk.txt
rbtree.txt [PATCH] Documentation/rbtree.txt 2007-02-11 10:51:35 -08:00
riscom8.txt
robust-futex-ABI.txt
robust-futexes.txt
rocket.txt
rpc-cache.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt [PATCH] some rtc documentation updates 2007-02-11 11:18:06 -08:00
sched-arch.txt
sched-coding.txt
sched-design.txt
sched-domains.txt
sched-stats.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
sharedsubtree.txt
smart-config.txt
smp.txt
sony-laptop.txt sony-laptop: update documentation and Kconfig help 2007-04-10 16:01:19 -04:00
sonypi.txt
sparse.txt [PATCH] update 'getting sparse' info. 2007-03-08 16:47:58 -08:00
specialix.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
stallion.txt
svga.txt
sx.txt
sysrq.txt [PATCH] Documentation/sysrq.txt: added short description for 'Q' (timerlist) 2007-03-22 19:39:05 -07:00
thinkpad-acpi.txt ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers 2007-04-28 21:41:20 -04:00
time_interpolators.txt
tipar.txt
tty.txt
unicode.txt
unshare.txt
video-output.txt
voyager.txt
xterm-linux.xpm
zorro.txt

README.cycladesZ

The Cyclades-Z must have firmware loaded onto the card before it will
operate.  This operation should be performed during system startup,

The firmware, loader program and the latest device driver code are
available from Cyclades at
    ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/