linux/drivers
KAMEZAWA Hiroyuki 4365a5676f oom-kill: fix NUMA constraint check with nodemask
Fix node-oriented allocation handling in oom-kill.c I myself think of this
as a bugfix not as an ehnancement.

In these days, things are changed as
  - alloc_pages() eats nodemask as its arguments, __alloc_pages_nodemask().
  - mempolicy don't maintain its own private zonelists.
  (And cpuset doesn't use nodemask for __alloc_pages_nodemask())

So, current oom-killer's check function is wrong.

This patch does
  - check nodemask, if nodemask && nodemask doesn't cover all
    node_states[N_HIGH_MEMORY], this is CONSTRAINT_MEMORY_POLICY.
  - Scan all zonelist under nodemask, if it hits cpuset's wall
    this faiulre is from cpuset.
And
  - modifies the caller of out_of_memory not to call oom if __GFP_THISNODE.
    This doesn't change "current" behavior. If callers use __GFP_THISNODE
    it should handle "page allocation failure" by itself.

  - handle __GFP_NOFAIL+__GFP_THISNODE path.
    This is something like a FIXME but this gfpmask is not used now.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hioryu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-16 07:19:57 -08:00
..
accessibility
acpi Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2009-12-11 15:59:23 -08:00
amba
ata Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-12-12 14:27:24 -08:00
atm Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-12-11 17:12:17 -08:00
auxdisplay
base mm: slab-allocate memory section nodemask for large systems 2009-12-15 08:53:20 -08:00
block Merge branch 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block 2009-12-15 09:11:28 -08:00
bluetooth USB: remove the auto_pm flag 2009-12-11 11:55:21 -08:00
cdrom Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-12-09 19:03:16 -08:00
char oom-kill: fix NUMA constraint check with nodemask 2009-12-16 07:19:57 -08:00
clocksource cs5535: add a generic clock event MFGPT driver 2009-12-15 08:53:28 -08:00
connector
cpufreq Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
cpuidle drivers/cpuidle: Move dereference after NULL test 2009-12-15 08:53:25 -08:00
crypto Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
dca
dio m68k: don't export static inline functions 2009-12-06 11:18:28 +01:00
dma const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
edac x86, msr: Add support for non-contiguous cpumasks 2009-12-11 10:59:21 -08:00
eisa
firewire Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2009-12-11 15:22:27 -08:00
firmware firmware: only allow EDD on x86 2009-12-15 08:53:34 -08:00
gpio cs5535: drop the Geode-specific MFGPT/GPIO code 2009-12-15 08:53:28 -08:00
gpu Merge branch 'drm-nouveau-pony' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2009-12-11 14:32:49 -08:00
hid USB: remove the auto_pm flag 2009-12-11 11:55:21 -08:00
hwmon lis3: scale output values to mg 2009-12-15 08:53:36 -08:00
i2c const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
ide Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-12-12 14:27:24 -08:00
idle
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
ieee802154
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
input const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2009-12-14 12:33:02 -08:00
leds tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
lguest Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-12-12 14:27:24 -08:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2009-12-15 09:12:01 -08:00
media const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
memstick
message Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-12-09 19:43:33 -08:00
mfd mfd: compile fix for twl4030 renaming 2009-12-15 09:33:36 -08:00
misc cs5535: drop the Geode-specific MFGPT/GPIO code 2009-12-15 08:53:28 -08:00
mmc mmc: let tmio-mmc use dev_name() with request_irq() 2009-12-15 08:53:35 -08:00
mtd const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
net const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
nubus
of Merge commit 'origin/master' into next 2009-12-09 17:14:38 +11:00
oprofile Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-12-14 09:58:24 -08:00
parisc tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
parport Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2009-12-08 08:13:35 -08:00
pci const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
pcmcia const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
platform tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
pnp tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
power Merge git://git.infradead.org/battery-2.6 2009-12-15 08:59:33 -08:00
pps
ps3
rapidio
regulator regulator: Add support for twl6030 regulators 2009-12-14 00:26:20 +01:00
rtc const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
s390 tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
sbus
scsi Subject: Re: [PATCH] strstrip incorrectly marked __must_check 2009-12-15 08:53:34 -08:00
serial ioc3/ioc4: fix error path on driver registration 2009-12-15 08:53:27 -08:00
sfi
sh
sn ioc3/ioc4: fix error path on driver registration 2009-12-15 08:53:27 -08:00
spi const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
ssb Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-12-05 15:22:26 -08:00
staging Staging: batman: fix debug Kconfig option 2009-12-11 15:49:27 -08:00
tc
telephony Merge branch 'for-next' into for-linus 2009-12-07 18:36:35 +01:00
thermal
uio const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 2009-12-15 08:58:13 -08:00
uwb
video tree-wide: convert open calls to remove spaces to skip_spaces() lib function 2009-12-15 08:53:32 -08:00
virtio
vlynq
w1
watchdog const: constify remaining dev_pm_ops 2009-12-15 08:53:25 -08:00
xen Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-11 12:18:16 -08:00
zorro m68k: don't export static inline functions 2009-12-06 11:18:28 +01:00
Kconfig cs5535: add a generic clock event MFGPT driver 2009-12-15 08:53:28 -08:00
Makefile