commit d1edce71135cc6d98c0a4b5729774542b676e769 Author: sophgo-forum-service <forum_service@sophgo.com> Date: Fri Mar 15 16:07:33 2024 +0800 [fix] recommend using ssh method to clone repo. [fix] fix sensor driver repo branch name.
46 lines
971 B
C
46 lines
971 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __LINUX_SWAP_CGROUP_H
|
|
#define __LINUX_SWAP_CGROUP_H
|
|
|
|
#include <linux/swap.h>
|
|
|
|
#ifdef CONFIG_MEMCG_SWAP
|
|
|
|
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,
|
|
unsigned int nr_ents);
|
|
extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
|
|
extern int swap_cgroup_swapon(int type, unsigned long max_pages);
|
|
extern void swap_cgroup_swapoff(int type);
|
|
|
|
#else
|
|
|
|
static inline
|
|
unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id,
|
|
unsigned int nr_ents)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline
|
|
unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int
|
|
swap_cgroup_swapon(int type, unsigned long max_pages)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void swap_cgroup_swapoff(int type)
|
|
{
|
|
return;
|
|
}
|
|
|
|
#endif /* CONFIG_MEMCG_SWAP */
|
|
|
|
#endif /* __LINUX_SWAP_CGROUP_H */
|