remarkable-linux/Documentation
Michal Hocko 9a5a8f19b4 memcg: oom: fix totalpages calculation for memory.swappiness==0
oom_badness() takes a totalpages argument which says how many pages are
available and it uses it as a base for the score calculation.  The value
is calculated by mem_cgroup_get_limit which considers both limit and
total_swap_pages (resp.  memsw portion of it).

This is usually correct but since fe35004fbf ("mm: avoid swapping out
with swappiness==0") we do not swap when swappiness is 0 which means
that we cannot really use up all the totalpages pages.  This in turn
confuses oom score calculation if the memcg limit is much smaller than
the available swap because the used memory (capped by the limit) is
negligible comparing to totalpages so the resulting score is too small
if adj!=0 (typically task with CAP_SYS_ADMIN or non zero oom_score_adj).
A wrong process might be selected as result.

The problem can be worked around by checking mem_cgroup_swappiness==0
and not considering swap at all in such a case.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-11-16 14:33:04 -08:00
..
ABI SCSI misc on 20121012 2012-10-13 10:57:01 +09:00
accounting doc: getdelays.c: remember to close() socket on error in create_nl_socket() 2012-09-01 09:58:59 -07:00
acpi
aoe aoe: update documentation to better reflect aoe-plus-udev usage 2012-10-06 03:05:30 +09:00
arm Merge branch 'fixes' into for-linus 2012-10-11 10:55:04 +01:00
arm64 arm64: Move PCI_IOBASE closer to MODULES_VADDR 2012-10-23 15:30:51 +01:00
auxdisplay
backlight
blackfin
block block: Kill bi_destructor 2012-09-09 10:35:39 +02:00
blockdev
cdrom
cgroups memcg: oom: fix totalpages calculation for memory.swappiness==0 2012-11-16 14:33:04 -08:00
connector
console
cpu-freq acpi-cpufreq: Add support for disabling dynamic overclocking 2012-09-09 22:05:12 +02:00
cpuidle Honor state disabling in the cpuidle ladder governor 2012-09-04 01:35:44 +02:00
cris
crypto KEYS: Document asymmetric key type 2012-10-08 13:50:12 +10:30
development-process
device-mapper DM RAID: Add rebuild capability for RAID10 2012-10-11 13:40:24 +11:00
devicetree Linux 3.7-rc3 2012-10-30 00:09:18 -07:00
DocBook Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-10-18 16:10:42 -07:00
driver-model pwm: add devm_pwm_get() and devm_pwm_put() 2012-09-10 17:05:45 +02:00
dvb get_dvb_firmware: fix download site for tda10046 firmware 2012-09-28 16:16:00 -03:00
early-userspace
EDID
extcon
fault-injection fault-injection: add tool to run command with failslab or fail_page_alloc 2012-07-30 17:25:22 -07:00
fb
filesystems Merge branch 'for-3.7' of git://linux-nfs.org/~bfields/linux 2012-10-13 10:53:54 +09:00
firmware_class firmware loader: document kernel direct loading 2012-10-25 11:53:36 -07:00
frv
hid HID: sensors: add documentation 2012-09-06 19:11:04 +01:00
hwmon hwmon, fam15h_power: Change email address, MAINTAINERS entry 2012-10-29 17:48:01 -07:00
i2c i2c-mux-gpio: Update documentation 2012-10-05 22:23:54 +02:00
i2o
ia64 doc: aliasing-test: close fd on write error 2012-09-01 09:57:10 -07:00
ide
infiniband IB/ipoib: Add rtnl_link_ops support 2012-09-20 16:49:17 -04:00
input
ioctl ioctl-number.txt: Remove legacy private ioctl's from media drivers 2012-08-14 00:07:39 -03:00
isdn
ja_JP
kbuild UAPI: Remove the objhdr-y export list 2012-10-02 18:01:56 +01:00
kdump
ko_KR
laptops Documentation: fix the VM knobs descritpion WRT pdflush 2012-08-04 12:15:09 +04:00
leds leds-lp5523: add channel name in the platform data 2012-09-11 18:32:41 +08:00
m68k
make
memory-devices
mips
misc-devices lis3lv02d: Add STMicroelectronics lis331dlh digital accelerometer 2012-09-05 13:44:04 -07:00
mmc
mn10300
mtd
namespaces
netlabel
networking vxlan: virtual extensible lan 2012-10-01 18:39:45 -04:00
nfc
parisc
PCI
pcmcia
power 1. New drivers: 2012-10-07 17:29:24 +09:00
powerpc
pps
prctl
pti
ptp
rapidio
RCU Merge branches 'bigrt.2012.09.23a', 'doctorture.2012.09.23a', 'fixes.2012.09.23a', 'hotplug.2012.09.23a' and 'idlechop.2012.09.23a' into HEAD 2012-09-24 20:02:22 -07:00
s390
scheduler sched: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW 2012-09-13 16:52:04 +02:00
scsi [SCSI] megaraid_sas: Version, Changelog, Copyright update 2012-10-09 11:21:48 +01:00
security Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
serial firmware: remove computone driver firmware and documentation 2012-08-16 12:31:18 -07:00
sh
sound Merge branch 'topic/tlv-chmap' into for-next 2012-09-15 16:32:31 +02:00
spi spi: Updates for v3.7 2012-10-02 17:26:42 -07:00
sysctl coredump: add support for %d=__get_dumpable() in core name 2012-10-06 03:05:15 +09:00
target target: Simplify fabric sense data length handling 2012-09-17 17:12:58 -07:00
telephony
thermal hwmon: exynos4: move thermal sensor driver to driver/thermal directory 2012-09-24 14:44:38 +08:00
timers
trace doc: fix old config name of kprobetrace 2012-09-27 12:11:29 +02:00
usb usb: add decriptor of persist fail for some morph usb devices 2012-08-10 12:06:39 -07:00
vDSO
video4linux [media] media: v4l2-ctrl: add a helper function to add standard control with driver specific menu 2012-10-05 21:48:03 -03:00
virtual Merge branch 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-10-10 11:15:20 +09:00
vm mm: remove vma arg from page_evictable 2012-10-09 16:22:55 +09:00
w1 1-Wire: Add support for the maxim ds1825 temperature sensor 2012-08-16 12:33:59 -07:00
watchdog watchdog: fix watchdog-test.c build warning 2012-08-29 17:12:58 +02:00
wimax
x86 x86/mce: Provide boot argument to honour bios-set CMCI threshold 2012-09-27 10:08:00 -07:00
zh_CN Documentation:Chinese translation of Documentation/arm64/memory.txt 2012-10-25 11:54:06 -07:00
.gitignore
00-INDEX Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-10-24 04:07:02 +03:00
applying-patches.txt
atomic_ops.txt
bad_memory.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
btmrvl.txt
BUG-HUNTING
bus-virt-phys-mapping.txt
cachetlb.txt
Changes
circular-buffers.txt
clk.txt
coccinelle.txt
CodingStyle CodingStyle: add networking specific block comment style 2012-10-06 03:04:59 +09:00
cpu-hotplug.txt
cpu-load.txt
cputopology.txt
crc32.txt
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt
devices.txt
digsig.txt
DMA-API-HOWTO.txt
DMA-API.txt
DMA-attributes.txt common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute 2012-07-30 12:25:47 +02:00
dma-buf-sharing.txt
DMA-ISA-LPC.txt
dmaengine.txt
dontdiff Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-10-01 09:06:36 -07:00
dynamic-debug-howto.txt
edac.txt Merge branch 'devel' 2012-07-29 21:11:05 -03:00
eisa.txt
email-clients.txt
flexible-arrays.txt
futex-requeue-pi.txt
gcov.txt
gpio.txt
highuid.txt
HOWTO
hw_random.txt
hwspinlock.txt
init.txt
initrd.txt
Intel-IOMMU.txt
intel_txt.txt
io-mapping.txt
io_ordering.txt
iostats.txt
IPMI.txt IPMI: Remove SMBus driver info from the docs 2012-10-16 18:07:12 -07:00
IRQ-affinity.txt
IRQ-domain.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt
kernel-docs.txt
kernel-parameters.txt Merge branch 'modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-14 13:39:34 -07:00
kmemcheck.txt
kmemleak.txt
kobject.txt Documentation: Fix "struct kobj_type" to include newer members. 2012-09-04 16:06:34 -07:00
kprobes.txt
kref.txt
ldm.txt
local_ops.txt
lockdep-design.txt
lockstat.txt
lockup-watchdogs.txt
logo.gif
logo.txt
magic-number.txt
Makefile
ManagementStyle
md.txt
media-framework.txt
memory-barriers.txt
memory-hotplug.txt
mono.txt
mutex-design.txt
nommu-mmap.txt
numastat.txt
oops-tracing.txt
padata.txt
parport-lowlevel.txt
parport.txt
percpu-rw-semaphore.txt percpu-rw-semaphore: fix documentation typos 2012-09-26 19:56:15 +02:00
pi-futex.txt
pinctrl.txt pinctrl: document semantics vs GPIO 2012-09-17 10:53:57 +02:00
pnp.txt
preempt-locking.txt
printk-formats.txt lib/vsprintf: update documentation to cover all of %p[Mm][FR] 2012-10-06 03:04:50 +09:00
pwm.txt pwm: add devm_pwm_get() and devm_pwm_put() 2012-09-10 17:05:45 +02:00
ramoops.txt pstore/ftrace: Convert to its own enable/disable debugfs knob 2012-09-06 22:16:58 -07:00
rbtree.txt rbtree: move augmented rbtree functionality to rbtree_augmented.h 2012-10-09 16:22:40 +09:00
remoteproc.txt remoteproc: add rproc_report_crash function to notify rproc crashes 2012-09-18 12:53:22 +03:00
rfkill.txt
robust-futex-ABI.txt
robust-futexes.txt
rpmsg.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt rtc-proc: permit the /proc/driver/rtc device to use other devices 2012-10-06 03:05:01 +09:00
SAK.txt
SecurityBugs
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
smsc_ece1099.txt mfd: smsc: Add support for smsc gpio io/keypad driver 2012-10-01 15:27:48 +02:00
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt
static-keys.txt
SubmitChecklist
SubmittingDrivers
SubmittingPatches
svga.txt
sysfs-rules.txt
sysrq.txt sparc64: Add global PMU register dumping via sysrq. 2012-10-16 09:34:01 -07:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
vfio.txt vfio: Trivial Documentation correction 2012-09-21 10:48:03 -06:00
VGA-softcursor.txt
vgaarbiter.txt
video-output.txt
vme_api.txt
volatile-considered-harmful.txt
workqueue.txt
xz.txt
zorro.txt