aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmzone.h5
-rw-r--r--include/linux/oom.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index bad9486ee0cc..9011505e740d 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -344,6 +344,7 @@ struct zone {
344typedef enum { 344typedef enum {
345 ZONE_ALL_UNRECLAIMABLE, /* all pages pinned */ 345 ZONE_ALL_UNRECLAIMABLE, /* all pages pinned */
346 ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */ 346 ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */
347 ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */
347} zone_flags_t; 348} zone_flags_t;
348 349
349static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) 350static inline void zone_set_flag(struct zone *zone, zone_flags_t flag)
@@ -363,6 +364,10 @@ static inline int zone_is_reclaim_locked(const struct zone *zone)
363{ 364{
364 return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); 365 return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags);
365} 366}
367static inline int zone_is_oom_locked(const struct zone *zone)
368{
369 return test_bit(ZONE_OOM_LOCKED, &zone->flags);
370}
366 371
367/* 372/*
368 * The "priority" of VM scanning is how much of the queues we will scan in one 373 * The "priority" of VM scanning is how much of the queues we will scan in one
diff --git a/include/linux/oom.h b/include/linux/oom.h
index cf6ebf5b422c..e9081200cdb7 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -20,6 +20,9 @@ enum oom_constraint {
20 CONSTRAINT_MEMORY_POLICY, 20 CONSTRAINT_MEMORY_POLICY,
21}; 21};
22 22
23extern int try_set_zone_oom(struct zonelist *zonelist);
24extern void clear_zonelist_oom(struct zonelist *zonelist);
25
23extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); 26extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
24extern int register_oom_notifier(struct notifier_block *nb); 27extern int register_oom_notifier(struct notifier_block *nb);
25extern int unregister_oom_notifier(struct notifier_block *nb); 28extern int unregister_oom_notifier(struct notifier_block *nb);