afs: Provide a splice-read wrapper
[linux-block.git] / mm / page_alloc.c
index 6da423ec356f9e3ce8b1df8a5d7ef76467386f3e..47421bedc12b7a99db2ac595f3e33fc20999aecf 100644 (file)
@@ -1502,6 +1502,15 @@ void __free_pages_core(struct page *page, unsigned int order)
  * interleaving within a single pageblock. It is therefore sufficient to check
  * the first and last page of a pageblock and avoid checking each individual
  * page in a pageblock.
+ *
+ * Note: the function may return non-NULL struct page even for a page block
+ * which contains a memory hole (i.e. there is no physical memory for a subset
+ * of the pfn range). For example, if the pageblock order is MAX_ORDER, which
+ * will fall into 2 sub-sections, and the end pfn of the pageblock may be hole
+ * even though the start pfn is online and valid. This should be safe most of
+ * the time because struct pages are still initialized via init_unavailable_range()
+ * and pfn walkers shouldn't touch any physical memory range for which they do
+ * not recognize any specific metadata in struct pages.
  */
 struct page *__pageblock_pfn_to_page(unsigned long start_pfn,
                                     unsigned long end_pfn, struct zone *zone)
@@ -3385,7 +3394,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 retry:
        /*
         * Scan zonelist, looking for a zone with enough free.
-        * See also __cpuset_node_allowed() comment in kernel/cgroup/cpuset.c.
+        * See also cpuset_node_allowed() comment in kernel/cgroup/cpuset.c.
         */
        no_fallback = alloc_flags & ALLOC_NOFRAGMENT;
        z = ac->preferred_zoneref;
@@ -4059,7 +4068,7 @@ gfp_to_alloc_flags(gfp_t gfp_mask, unsigned int order)
                /*
                 * Ignore cpuset mems for non-blocking __GFP_HIGH (probably
                 * GFP_ATOMIC) rather than fail, see the comment for
-                * __cpuset_node_allowed().
+                * cpuset_node_allowed().
                 */
                if (alloc_flags & ALLOC_MIN_RESERVE)
                        alloc_flags &= ~ALLOC_CPUSET;