[S390] fill out file list in s390 MAINTAINERS entry
[safe/jmp/linux-2.6] / include / linux / swap.h
index ac43d87..b6b6143 100644 (file)
@@ -146,11 +146,13 @@ enum {
        SWP_DISCARDING  = (1 << 3),     /* now discarding a free cluster */
        SWP_SOLIDSTATE  = (1 << 4),     /* blkdev seeks are cheap */
        SWP_CONTINUED   = (1 << 5),     /* swap_map has count continuation */
+       SWP_BLKDEV      = (1 << 6),     /* its a block device */
                                        /* add others here before... */
        SWP_SCANNING    = (1 << 8),     /* refcount in scan_swap_map */
 };
 
 #define SWAP_CLUSTER_MAX 32
+#define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX
 
 #define SWAP_MAP_MAX   0x3e    /* Max duplication count, in first swap_map */
 #define SWAP_MAP_BAD   0x3f    /* Note pageblock is bad, in first swap_map */
@@ -167,21 +169,21 @@ struct swap_info_struct {
        signed short    prio;           /* swap priority of this type */
        signed char     type;           /* strange name for an index */
        signed char     next;           /* next type on the swap list */
-       struct file *swap_file;
-       struct block_device *bdev;
-       struct swap_extent first_swap_extent;
-       struct swap_extent *curr_swap_extent;
-       unsigned char *swap_map;
-       unsigned int lowest_bit;
-       unsigned int highest_bit;
+       unsigned int    max;            /* extent of the swap_map */
+       unsigned char *swap_map;        /* vmalloc'ed array of usage counts */
+       unsigned int lowest_bit;        /* index of first free in swap_map */
+       unsigned int highest_bit;       /* index of last free in swap_map */
+       unsigned int pages;             /* total of usable pages of swap */
+       unsigned int inuse_pages;       /* number of those currently in use */
+       unsigned int cluster_next;      /* likely index for next allocation */
+       unsigned int cluster_nr;        /* countdown to next cluster search */
        unsigned int lowest_alloc;      /* while preparing discard cluster */
        unsigned int highest_alloc;     /* while preparing discard cluster */
-       unsigned int cluster_next;
-       unsigned int cluster_nr;
-       unsigned int pages;
-       unsigned int max;
-       unsigned int inuse_pages;
-       unsigned int old_block_size;
+       struct swap_extent *curr_swap_extent;
+       struct swap_extent first_swap_extent;
+       struct block_device *bdev;      /* swap device or bdev of swap file */
+       struct file *swap_file;         /* seldom referenced */
+       unsigned int old_block_size;    /* seldom referenced */
 };
 
 struct swap_list_t {
@@ -223,20 +225,15 @@ static inline void lru_cache_add_anon(struct page *page)
        __lru_cache_add(page, LRU_INACTIVE_ANON);
 }
 
-static inline void lru_cache_add_active_anon(struct page *page)
-{
-       __lru_cache_add(page, LRU_ACTIVE_ANON);
-}
-
 static inline void lru_cache_add_file(struct page *page)
 {
        __lru_cache_add(page, LRU_INACTIVE_FILE);
 }
 
-static inline void lru_cache_add_active_file(struct page *page)
-{
-       __lru_cache_add(page, LRU_ACTIVE_FILE);
-}
+/* LRU Isolation modes. */
+#define ISOLATE_INACTIVE 0     /* Isolate inactive pages. */
+#define ISOLATE_ACTIVE 1       /* Isolate active pages. */
+#define ISOLATE_BOTH 2         /* Isolate both active and inactive pages. */
 
 /* linux/mm/vmscan.c */
 extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order,
@@ -325,7 +322,7 @@ extern void swapcache_free(swp_entry_t, struct page *page);
 extern int free_swap_and_cache(swp_entry_t);
 extern int swap_type_of(dev_t, sector_t, struct block_device **);
 extern unsigned int count_swap_pages(int, int);
-extern sector_t map_swap_page(swp_entry_t, struct block_device **);
+extern sector_t map_swap_page(struct page *, struct block_device **);
 extern sector_t swapdev_block(int, pgoff_t);
 extern int reuse_swap_page(struct page *);
 extern int try_to_free_swap(struct page *);
@@ -355,6 +352,7 @@ static inline void disable_swap_token(void)
 #ifdef CONFIG_CGROUP_MEM_RES_CTLR
 extern void
 mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout);
+extern int mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep);
 #else
 static inline void
 mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout)
@@ -485,6 +483,14 @@ mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)
 {
 }
 
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR
+static inline int
+mem_cgroup_count_swap_user(swp_entry_t ent, struct page **pagep)
+{
+       return 0;
+}
+#endif
+
 #endif /* CONFIG_SWAP */
 #endif /* __KERNEL__*/
 #endif /* _LINUX_SWAP_H */