patch-2.2.8 linux/include/linux/pagemap.h
Next file: linux/include/linux/parport_pc.h
Previous file: linux/include/linux/nfs_fs.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Tue May 11 10:35:49 1999
- Orig file:
v2.2.7/linux/include/linux/pagemap.h
- Orig date:
Wed Apr 28 11:37:31 1999
diff -u --recursive --new-file v2.2.7/linux/include/linux/pagemap.h linux/include/linux/pagemap.h
@@ -17,6 +17,27 @@
return PAGE_OFFSET + PAGE_SIZE * (page - mem_map);
}
+/*
+ * The page cache can done in larger chunks than
+ * one page, because it allows for more efficient
+ * throughput (it can then be mapped into user
+ * space in smaller chunks for same flexibility).
+ *
+ * Or rather, it _will_ be done in larger chunks.
+ */
+#define PAGE_CACHE_SHIFT PAGE_SHIFT
+#define PAGE_CACHE_SIZE PAGE_SIZE
+#define PAGE_CACHE_MASK PAGE_MASK
+
+#define page_cache_alloc() __get_free_page(GFP_USER)
+#define page_cache_free(x) free_page(x)
+#define page_cache_release(x) __free_page(x)
+
+/*
+ * From a kernel address, get the "struct page *"
+ */
+#define page_cache_entry(x) (mem_map + MAP_NR(x))
+
#define PAGE_HASH_BITS 12
#define PAGE_HASH_SIZE (1 << PAGE_HASH_BITS)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)