|
@@ -163,17 +163,11 @@ unsigned long badness(struct task_struct *p, unsigned long uptime)
|
|
|
return points;
|
|
|
}
|
|
|
|
|
|
-/*
|
|
|
- * Types of limitations to the nodes from which allocations may occur
|
|
|
- */
|
|
|
-#define CONSTRAINT_NONE 1
|
|
|
-#define CONSTRAINT_MEMORY_POLICY 2
|
|
|
-#define CONSTRAINT_CPUSET 3
|
|
|
-
|
|
|
/*
|
|
|
* Determine the type of allocation constraint.
|
|
|
*/
|
|
|
-static inline int constrained_alloc(struct zonelist *zonelist, gfp_t gfp_mask)
|
|
|
+static inline enum oom_constraint constrained_alloc(struct zonelist *zonelist,
|
|
|
+ gfp_t gfp_mask)
|
|
|
{
|
|
|
#ifdef CONFIG_NUMA
|
|
|
struct zone **z;
|
|
@@ -393,7 +387,7 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
|
|
|
struct task_struct *p;
|
|
|
unsigned long points = 0;
|
|
|
unsigned long freed = 0;
|
|
|
- int constraint;
|
|
|
+ enum oom_constraint constraint;
|
|
|
|
|
|
blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
|
|
|
if (freed > 0)
|