b084d4353f
A frequent questions from users about memory management is what numbers of swap ents are user for processes. And this information will give some hints to oom-killer. Besides we can count the number of swapents per a process by scanning /proc/<pid>/smaps, this is very slow and not good for usual process information handler which works like 'ps' or 'top'. (ps or top is now enough slow..) This patch adds a counter of swapents to mm_counter and update is at each swap events. Information is exported via /proc/<pid>/status file as [kamezawa@bluextal memory]$ cat /proc/self/status Name: cat State: R (running) Tgid: 2910 Pid: 2910 PPid: 2823 TracerPid: 0 Uid: 500 500 500 500 Gid: 500 500 500 500 FDSize: 256 Groups: 500 VmPeak: 82696 kB VmSize: 82696 kB VmLck: 0 kB VmHWM: 432 kB VmRSS: 432 kB VmData: 172 kB VmStk: 84 kB VmExe: 48 kB VmLib: 1568 kB VmPTE: 40 kB VmSwap: 0 kB <=============== this. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
ABI | ||
accounting | ||
acpi | ||
aoe | ||
arm | ||
auxdisplay | ||
blackfin | ||
block | ||
blockdev | ||
cdrom | ||
cgroups | ||
connector | ||
console | ||
cpu-freq | ||
cpuidle | ||
cris | ||
crypto | ||
development-process | ||
device-mapper | ||
DocBook | ||
driver-model | ||
dvb | ||
early-userspace | ||
fault-injection | ||
fb | ||
filesystems | ||
firmware_class | ||
frv | ||
hwmon | ||
i2c | ||
i2o | ||
ia64 | ||
ide | ||
infiniband | ||
input | ||
ioctl | ||
isdn | ||
ja_JP | ||
kbuild | ||
kdump | ||
ko_KR | ||
kvm | ||
laptops | ||
lguest | ||
m68k | ||
make | ||
mips | ||
misc-devices | ||
mn10300 | ||
mtd | ||
namespaces | ||
netlabel | ||
networking | ||
parisc | ||
PCI | ||
pcmcia | ||
power | ||
powerpc | ||
pps | ||
prctl | ||
RCU | ||
s390 | ||
scheduler | ||
scsi | ||
serial | ||
sh | ||
sound | ||
sparc | ||
spi | ||
sysctl | ||
telephony | ||
thermal | ||
timers | ||
trace | ||
uml | ||
usb | ||
video4linux | ||
vm | ||
w1 | ||
watchdog | ||
wimax | ||
x86 | ||
zh_CN | ||
00-INDEX | ||
applying-patches.txt | ||
atomic_ops.txt | ||
bad_memory.txt | ||
basic_profiling.txt | ||
binfmt_misc.txt | ||
braille-console.txt | ||
bt8xxgpio.txt | ||
btmrvl.txt | ||
BUG-HUNTING | ||
cachetlb.txt | ||
Changes | ||
CodingStyle | ||
cpu-hotplug.txt | ||
cpu-load.txt | ||
cputopology.txt | ||
credentials.txt | ||
dcdbas.txt | ||
debugging-modules.txt | ||
debugging-via-ohci1394.txt | ||
dell_rbu.txt | ||
devices.txt | ||
DMA-API.txt | ||
DMA-attributes.txt | ||
DMA-ISA-LPC.txt | ||
dmaengine.txt | ||
dontdiff | ||
dynamic-debug-howto.txt | ||
edac.txt | ||
eisa.txt | ||
email-clients.txt | ||
feature-removal-schedule.txt | ||
flexible-arrays.txt | ||
futex-requeue-pi.txt | ||
gcov.txt | ||
gpio.txt | ||
highuid.txt | ||
HOWTO | ||
hw_random.txt | ||
initrd.txt | ||
intel_txt.txt | ||
Intel-IOMMU.txt | ||
io_ordering.txt | ||
io-mapping.txt | ||
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 | ||
keys-request-key.txt | ||
keys.txt | ||
kmemcheck.txt | ||
kmemleak.txt | ||
kobject.txt | ||
kprobes.txt | ||
kref.txt | ||
ldm.txt | ||
leds-class.txt | ||
leds-lp3944.txt | ||
local_ops.txt | ||
lockdep-design.txt | ||
lockstat.txt | ||
logo.gif | ||
logo.txt | ||
magic-number.txt | ||
Makefile | ||
ManagementStyle | ||
mca.txt | ||
md.txt | ||
memory-barriers.txt | ||
memory-hotplug.txt | ||
memory.txt | ||
mono.txt | ||
mutex-design.txt | ||
nmi_watchdog.txt | ||
nommu-mmap.txt | ||
numastat.txt | ||
oops-tracing.txt | ||
parport-lowlevel.txt | ||
parport.txt | ||
pi-futex.txt | ||
pnp.txt | ||
preempt-locking.txt | ||
printk-formats.txt | ||
prio_tree.txt | ||
rbtree.txt | ||
rfkill.txt | ||
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 | ||
slow-work.txt | ||
SM501.txt | ||
Smack.txt | ||
sparse.txt | ||
spinlocks.txt | ||
stable_api_nonsense.txt | ||
stable_kernel_rules.txt | ||
SubmitChecklist | ||
SubmittingDrivers | ||
SubmittingPatches | ||
svga.txt | ||
sysfs-rules.txt | ||
sysrq.txt | ||
tomoyo.txt | ||
unaligned-memory-access.txt | ||
unicode.txt | ||
unshare.txt | ||
VGA-softcursor.txt | ||
vgaarbiter.txt | ||
video-output.txt | ||
volatile-considered-harmful.txt | ||
voyager.txt | ||
zorro.txt |