aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 2aaf7e08c5a8..abc1641011f2 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -533,6 +533,22 @@ static inline bool zone_is_empty(struct zone *zone)
533} 533}
534 534
535/* 535/*
536 * Return true if [start_pfn, start_pfn + nr_pages) range has a non-empty
537 * intersection with the given zone
538 */
539static inline bool zone_intersects(struct zone *zone,
540 unsigned long start_pfn, unsigned long nr_pages)
541{
542 if (zone_is_empty(zone))
543 return false;
544 if (start_pfn >= zone_end_pfn(zone) ||
545 start_pfn + nr_pages <= zone->zone_start_pfn)
546 return false;
547
548 return true;
549}
550
551/*
536 * The "priority" of VM scanning is how much of the queues we will scan in one 552 * The "priority" of VM scanning is how much of the queues we will scan in one
537 * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the 553 * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the
538 * queues ("queue_length >> 12") during an aging round. 554 * queues ("queue_length >> 12") during an aging round.