]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/mm_types.h
mm/net: Rename and move page fragment handling from net/ to mm/
[mirror_ubuntu-zesty-kernel.git] / include / linux / mm_types.h
index 8d37e26a1007c6493990093e7ce8a03f2b201419..0038ac7466fd26e7562a026af68632573e3bb0ea 100644 (file)
@@ -226,6 +226,24 @@ struct page_frag {
 #endif
 };
 
+#define PAGE_FRAG_CACHE_MAX_SIZE       __ALIGN_MASK(32768, ~PAGE_MASK)
+#define PAGE_FRAG_CACHE_MAX_ORDER      get_order(PAGE_FRAG_CACHE_MAX_SIZE)
+
+struct page_frag_cache {
+       void * va;
+#if (PAGE_SIZE < PAGE_FRAG_CACHE_MAX_SIZE)
+       __u16 offset;
+       __u16 size;
+#else
+       __u32 offset;
+#endif
+       /* we maintain a pagecount bias, so that we dont dirty cache line
+        * containing page->_count every time we allocate a fragment.
+        */
+       unsigned int            pagecnt_bias;
+       bool pfmemalloc;
+};
+
 typedef unsigned long __nocast vm_flags_t;
 
 /*