2008-10-19 03:28:16 +00:00
|
|
|
#ifndef __LINUX_PAGE_CGROUP_H
|
|
|
|
#define __LINUX_PAGE_CGROUP_H
|
|
|
|
|
2009-01-08 02:07:58 +00:00
|
|
|
#include <linux/swap.h>
|
2009-09-20 10:50:44 +00:00
|
|
|
|
2012-07-31 23:43:02 +00:00
|
|
|
#ifdef CONFIG_MEMCG_SWAP
|
2010-03-10 23:22:17 +00:00
|
|
|
extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
|
|
|
|
unsigned short old, unsigned short new);
|
2009-04-02 23:57:45 +00:00
|
|
|
extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
|
2012-01-13 01:18:48 +00:00
|
|
|
extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
|
2009-01-08 02:07:58 +00:00
|
|
|
extern int swap_cgroup_swapon(int type, unsigned long max_pages);
|
|
|
|
extern void swap_cgroup_swapoff(int type);
|
|
|
|
#else
|
|
|
|
|
|
|
|
static inline
|
2009-04-02 23:57:45 +00:00
|
|
|
unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
|
2009-01-08 02:07:58 +00:00
|
|
|
{
|
2009-04-02 23:57:45 +00:00
|
|
|
return 0;
|
2009-01-08 02:07:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline
|
2012-01-13 01:18:48 +00:00
|
|
|
unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
|
2009-01-08 02:07:58 +00:00
|
|
|
{
|
2009-04-02 23:57:45 +00:00
|
|
|
return 0;
|
2009-01-08 02:07:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline int
|
|
|
|
swap_cgroup_swapon(int type, unsigned long max_pages)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void swap_cgroup_swapoff(int type)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-07-31 23:43:02 +00:00
|
|
|
#endif /* CONFIG_MEMCG_SWAP */
|
2011-03-23 23:42:30 +00:00
|
|
|
|
|
|
|
#endif /* __LINUX_PAGE_CGROUP_H */
|