Files
linux-apfs/include/linux/swap_cgroup.h
T

43 lines
876 B
C
Raw Normal View History

#ifndef __LINUX_SWAP_CGROUP_H
#define __LINUX_SWAP_CGROUP_H
2008-10-18 20:28:16 -07:00
2009-01-07 18:07:58 -08:00
#include <linux/swap.h>
2012-07-31 16:43:02 -07:00
#ifdef CONFIG_MEMCG_SWAP
2010-03-10 15:22:17 -08:00
extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
unsigned short old, unsigned short new);
extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
2009-01-07 18:07:58 -08:00
extern int swap_cgroup_swapon(int type, unsigned long max_pages);
extern void swap_cgroup_swapoff(int type);
2009-01-07 18:07:58 -08:00
#else
static inline
unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
2009-01-07 18:07:58 -08:00
{
return 0;
2009-01-07 18:07:58 -08:00
}
static inline
unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
2009-01-07 18:07:58 -08:00
{
return 0;
2009-01-07 18:07:58 -08: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 16:43:02 -07:00
#endif /* CONFIG_MEMCG_SWAP */
#endif /* __LINUX_SWAP_CGROUP_H */