1
0
Fork 0
alistair23-linux/drivers
Michal Hocko d75da004c7 oom: improve oom disable handling
Tetsuo has reported that sysrq triggered OOM killer will print a
misleading information when no tasks are selected:

  sysrq: SysRq : Manual OOM execution
  Out of memory: Kill process 4468 ((agetty)) score 0 or sacrifice child
  Killed process 4468 ((agetty)) total-vm:43704kB, anon-rss:1760kB, file-rss:0kB, shmem-rss:0kB
  sysrq: SysRq : Manual OOM execution
  Out of memory: Kill process 4469 (systemd-cgroups) score 0 or sacrifice child
  Killed process 4469 (systemd-cgroups) total-vm:10704kB, anon-rss:120kB, file-rss:0kB, shmem-rss:0kB
  sysrq: SysRq : Manual OOM execution
  sysrq: OOM request ignored because killer is disabled
  sysrq: SysRq : Manual OOM execution
  sysrq: OOM request ignored because killer is disabled
  sysrq: SysRq : Manual OOM execution
  sysrq: OOM request ignored because killer is disabled

The real reason is that there are no eligible tasks for the OOM killer
to select but since commit 7c5f64f844 ("mm: oom: deduplicate victim
selection code for memcg and global oom") the semantic of out_of_memory
has changed without updating moom_callback.

This patch updates moom_callback to tell that no task was eligible which
is the case for both oom killer disabled and no eligible tasks.  In
order to help distinguish first case from the second add printk to both
oom_killer_{enable,disable}.  This information is useful on its own
because it might help debugging potential memory allocation failures.

Fixes: 7c5f64f844 ("mm: oom: deduplicate victim selection code for memcg and global oom")
Link: http://lkml.kernel.org/r/20170404134705.6361-1-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-05-03 15:52:10 -07:00
..
accessibility
acpi - constify compression structures; Bhumika Goyal 2017-05-02 10:35:45 -07:00
amba
android sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
ata Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2017-05-01 13:34:49 -07:00
atm ambassador: use setup_timer 2017-03-12 23:47:16 -07:00
auxdisplay auxdisplay: img-ascii-lcd: add missing sentinel entry in img_ascii_lcd_matches 2017-03-16 16:59:55 +09:00
base Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 15:46:13 -07:00
bcma bcma: fill core OF info independently of bus type 2017-03-20 19:12:01 +02:00
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
bluetooth Bluetooth: hci_ldisc: Add protocol check to hci_uart_tx_wakeup() 2017-04-30 12:22:14 +02:00
bus ARM: SoC driver updates 2017-02-23 15:57:04 -08:00
cdrom scsi: introduce a result field in struct scsi_request 2017-04-20 12:16:10 -06:00
char Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-05-03 08:50:52 -07:00
clk MMC core: 2017-05-02 17:34:32 -07:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 16:15:18 -07:00
connector
cpufreq Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 19:12:53 -07:00
cpuidle Merge branches 'pm-cpuidle', 'pm-core', 'pm-domains', 'pm-avs' and 'pm-devfreq' 2017-04-28 23:15:34 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-05-02 15:53:46 -07:00
dax Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 23:54:56 -07:00
dca
devfreq PM / devfreq: Move struct devfreq_governor to devfreq directory 2017-04-12 12:42:14 +09:00
dio
dma dmaengine: Fix array index out of bounds warning in __get_unmap_pool() 2017-03-14 10:11:27 +05:30
dma-buf sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
edac EDAC, ghes: Do not enable it by default 2017-04-27 14:15:38 +02:00
eisa
extcon extcon: Add new extcon_register_notifier_all() to monitor all external connectors 2017-04-04 11:22:42 +09:00
firewire Merge branch 'idr-4.11' of git://git.infradead.org/users/willy/linux-dax 2017-02-28 20:29:41 -08:00
firmware - constify compression structures; Bhumika Goyal 2017-05-02 10:35:45 -07:00
fmc
fpga fpga zynq: Use the scatterlist interface 2017-02-10 15:20:44 +01:00
fsi drivers/fsi: add driver to device matches 2017-02-10 15:19:48 +01:00
gpio ACPI / gpio: do not fall back to parsing _CRS when we get a deferral 2017-03-30 11:08:46 +02:00
gpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
hsi HSI: ssi_protocol: double free in ssip_pn_xmit() 2017-04-21 17:58:45 +02:00
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
hwmon hwmon: (twl4030-madc) drop driver 2017-04-30 11:45:31 -07:00
hwspinlock
hwtracing Merge branch 'linus' into perf/core, to pick up fixes 2017-03-30 09:48:58 +02:00
i2c i2c: mux: pca954x: Add missing pca9546 definition to chip_desc 2017-03-24 12:22:18 +01:00
ide ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset 2017-04-26 07:53:35 -06:00
idle Power management turbostat utility updates for v4.11-rc1 2017-03-02 17:41:27 -08:00
iio iio: hid-sensor-attributes: Fix sensor property setting failure. 2017-04-02 11:44:03 +01:00
infiniband hw/mlx5: Add New bit to check over QP creation 2017-04-17 11:08:32 -04:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2017-04-28 11:08:42 -07:00
iommu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-05-02 09:50:09 -07:00
ipack
irqchip irqchip/mbigen: Fix return value check in mbigen_device_probe() 2017-04-30 11:21:16 +02:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
leds leds: pca9532: Extend pca9532 device tree support 2017-04-19 20:27:50 +02:00
lguest x86: Remap GDT tables in the fixmap section 2017-03-16 09:06:35 +01:00
lightnvm lightnvm: fix possible memory leak in pblk_bb_discovery() 2017-04-25 10:44:29 -06:00
macintosh drivers: Clean up duplicated email address 2017-03-24 15:49:56 +01:00
mailbox mailbox: handle empty message in tx_tick 2017-04-27 16:20:04 +05:30
mcb
md Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
media Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
memory Linux 4.11-rc1 2017-03-06 08:37:53 -08:00
memstick Merge branch 'for-4.11/next' into for-4.11/linus-merge 2017-02-17 14:08:19 -07:00
message SCSI misc on 20170220 2017-02-21 11:51:42 -08:00
mfd staging/iio driver patches for 4.11-rc1 2017-02-22 12:14:01 -08:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
mmc MMC core: 2017-05-02 17:34:32 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
nfc nfc: fix get_unaligned_...() misuses 2017-04-17 00:42:22 +02:00
ntb ntb: ntb_hw_intel: link_poll isn't clearing the pending status properly 2017-02-16 23:11:26 -05:00
nubus nubus: Clean up whitespace 2017-04-20 09:54:24 +02:00
nvdimm Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 23:54:56 -07:00
nvme Merge branch 'for-4.12/block' of git://git.kernel.dk/linux-block 2017-05-01 10:39:57 -07:00
nvmem
of mdio_bus: Issue GPIO RESET to PHYs. 2017-04-24 12:40:24 -04:00
oprofile sched/headers: Prepare to move the get_task_struct()/put_task_struct() and related APIs from <linux/sched.h> to <linux/sched/task.h> 2017-03-02 08:42:40 +01:00
parisc Merge branch 'parisc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2017-03-03 16:20:06 -08:00
parport parport: fix attempt to write duplicate procfiles 2017-03-16 17:32:21 +09:00
pci Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
pcmcia
perf sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h> 2017-03-02 08:42:27 +01:00
phy phy: qcom-usb-hs: Add depends on EXTCON 2017-03-09 15:29:57 +05:30
pinctrl Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
platform LED updates for 4.12 2017-05-01 13:12:49 -07:00
pnp x86: Remap GDT tables in the fixmap section 2017-03-16 09:06:35 +01:00
power ACPI updates for v4.12-rc1 2017-05-01 14:13:28 -07:00
powercap
pps
ps3 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
ptp Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 16:15:18 -07:00
pwm pwm: rockchip: State of PWM clock should synchronize with PWM enabled state 2017-04-06 15:08:52 +02:00
rapidio drivers/rapidio/devices/tsi721.c: make module parameter variable name unique 2017-03-31 17:13:30 -07:00
ras RAS: Add a Corrected Errors Collector 2017-03-28 08:54:48 +02:00
regulator regulator: Updates for v4.11 2017-02-20 17:23:57 -08:00
remoteproc soc: qcom: smd: Remove standalone driver 2017-03-28 17:58:07 -07:00
reset reset: add exported __reset_control_get, return NULL if optional 2017-04-04 17:36:10 +02:00
rpmsg soc: qcom: smd: Remove standalone driver 2017-03-28 17:58:07 -07:00
rtc sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
sbus jsflash: stop sharing request queue across multiple gendisks 2017-03-28 15:06:58 -06:00
scsi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
sfi
sh
sn
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
spi sched/headers: Prepare for new header dependencies before moving code to <uapi/linux/sched/types.h> 2017-03-02 08:42:27 +01:00
spmi
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
target Merge branch 'for-4.12/block' of git://git.kernel.dk/linux-block 2017-05-01 10:39:57 -07:00
tc
thermal Merge back cpufreq core changes for v4.12. 2017-04-15 00:23:36 +02:00
thunderbolt
tty oom: improve oom disable handling 2017-05-03 15:52:10 -07:00
uio sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
uwb uwb: i1480-dfu: fix NULL-deref at probe 2017-03-14 17:07:31 +08:00
vfio VFIO fixes for v4.11-rc4 2017-03-24 14:39:36 -07:00
vhost VSOCK: Add virtio vsock vsockmon hooks 2017-04-24 12:35:56 -04:00
video backlight: pwm_bl: Fix GPIO out for unimplemented .get_direction() 2017-04-19 19:59:44 +01:00
virt
virtio virtio-pci: Remove affinity hint before freeing the interrupt 2017-04-11 00:30:20 +03:00
vlynq
vme
w1 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
watchdog watchdog: retu: restore MFD dependency 2017-03-01 06:15:10 -08:00
xen xenbus: remove transaction holder from list before freeing 2017-04-04 10:11:06 -04:00
zorro
Kconfig drivers/fsi: Add empty fsi bus definitions 2017-02-10 15:19:48 +01:00
Makefile pci-v4.11-changes 2017-02-23 11:53:22 -08:00