login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2009
»
November
»
11
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check with nodemask v4.1
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: David Rientjes
Subject:
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check with nodemask v4.1
Date: Tuesday, November 10, 2009 - 10:58 pm
On Wed, 11 Nov 2009, KAMEZAWA Hiroyuki wrote:
quoted text
> Index: mm-test-kernel/drivers/char/sysrq.c > =================================================================== > --- mm-test-kernel.orig/drivers/char/sysrq.c > +++ mm-test-kernel/drivers/char/sysrq.c > @@ -339,7 +339,7 @@ static struct sysrq_key_op sysrq_term_op > > static void moom_callback(struct work_struct *ignored) > { > - out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0); > + out_of_memory(node_zonelist(0, GFP_KERNEL), GFP_KERNEL, 0, NULL); > } > > static DECLARE_WORK(moom_work, moom_callback); > Index: mm-test-kernel/mm/oom_kill.c > =================================================================== > --- mm-test-kernel.orig/mm/oom_kill.c > +++ mm-test-kernel/mm/oom_kill.c > @@ -196,27 +196,47 @@ unsigned long badness(struct task_struct > /* > * Determine the type of allocation constraint. > */ > -static inline enum oom_constraint constrained_alloc(struct zonelist *zonelist, > - gfp_t gfp_mask) > -{ > #ifdef CONFIG_NUMA > +static enum oom_constraint constrained_alloc(struct zonelist *zonelist, > + gfp_t gfp_mask, nodemask_t *nodemask) > +{ > struct zone *zone; > struct zoneref *z; > enum zone_type high_zoneidx = gfp_zone(gfp_mask); > - nodemask_t nodes = node_states[N_HIGH_MEMORY]; > + int ret = CONSTRAINT_NONE; > > - for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) > - if (cpuset_zone_allowed_softwall(zone, gfp_mask)) > - node_clear(zone_to_nid(zone), nodes); > - else > - return CONSTRAINT_CPUSET; > + /* > + * Reach here only when __GFP_NOFAIL is used. So, we should avoid > + * to kill current.We have to random task kill in this case. > + * Hopefully, CONSTRAINT_THISNODE...but no way to handle it, now. > + */ > + if (gfp_mask & __GPF_THISNODE) > + return ret; >
That shouldn't compile.
quoted text
> - if (!nodes_empty(nodes)) > + /* > + * The nodemask here is a nodemask passed to alloc_pages(). Now, > + * cpuset doesn't use this nodemask for its hardwall/softwall/hierarchy > + * feature. mempolicy is an only user of nodemask here. > + * check mempolicy's nodemask contains all N_HIGH_MEMORY > + */ > + if (nodemask && !nodes_subset(node_states[N_HIGH_MEMORY], *nodemask)) > return CONSTRAINT_MEMORY_POLICY; > -#endif > > + /* Check this allocation failure is caused by cpuset's wall function */ > + for_each_zone_zonelist_nodemask(zone, z, zonelist, > + high_zoneidx, nodemask) > + if (!cpuset_zone_allowed_softwall(zone, gfp_mask)) > + return CONSTRAINT_CPUSET; > + > + return CONSTRAINT_NONE; > +} > +#else > +static enum oom_constraint constrained_alloc(struct zonelist *zonelist, > + gfp_t gfp_mask, nodemask_t *nodemask)
inline seems appropriate in this case, gcc will optimize it anyway. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[BUGFIX][PATCH] oom-kill: fix NUMA consraint check with no ...
, KAMEZAWA Hiroyuki
, (Wed Nov 4, 1:09 am)
[BUGFIX][PATCH] oom-kill: fix NUMA consraint check with no ...
, KAMEZAWA Hiroyuki
, (Thu Nov 5, 5:02 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Tue Nov 10, 12:24 am)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 12:24 am)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Tue Nov 10, 12:39 am)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 12:40 am)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, Daisuke Nishimura
, (Tue Nov 10, 1:03 am)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 1:17 am)
[BUGFIX][PATCH] oom-kill: fix NUMA consraint check with no ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 7:24 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Tue Nov 10, 7:36 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 10, 7:49 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Tue Nov 10, 8:02 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 8:04 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 8:10 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 10, 8:14 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Tue Nov 10, 8:23 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 10, 8:27 pm)
[BUGFIX][PATCH] oom-kill: fix NUMA consraint check with no ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 9:45 pm)
[BUGFIX][PATCH] oom-kill: fix NUMA consraint check with no ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 10:28 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 10, 10:58 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 11:20 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 10, 11:26 pm)
[BUGFIX][PATCH] oom-kill: fix NUMA consraint check with no ...
, KAMEZAWA Hiroyuki
, (Tue Nov 10, 11:34 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Wed Nov 11, 12:32 am)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 17, 5:11 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Tue Nov 17, 5:58 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, Daisuke Nishimura
, (Tue Nov 17, 6:41 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Tue Nov 17, 7:13 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, Andrew Morton
, (Mon Dec 14, 6:16 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Mon Dec 14, 6:32 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Mon Dec 14, 6:38 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Mon Dec 14, 9:30 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Mon Dec 14, 9:35 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Mon Dec 14, 9:43 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Mon Dec 14, 9:47 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Mon Dec 14, 9:54 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Mon Dec 14, 9:57 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Mon Dec 14, 9:57 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Mon Dec 14, 10:03 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Mon Dec 14, 10:09 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Mon Dec 14, 10:19 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Thu Dec 17, 3:21 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Thu Dec 17, 3:23 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KAMEZAWA Hiroyuki
, (Thu Dec 17, 4:33 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, KOSAKI Motohiro
, (Thu Dec 17, 9:30 pm)
Re: [BUGFIX][PATCH] oom-kill: fix NUMA consraint check wit ...
, David Rientjes
, (Fri Dec 18, 3:04 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate