mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
b9eaacb1db
Rename exported function related to the charge move to have the memcg1_ prefix. Link: https://lkml.kernel.org/r/20240625005906.106920-6-roman.gushchin@linux.dev Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Shakeel Butt <shakeel.butt@linux.dev> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Muchun Song <muchun.song@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#ifndef __MM_MEMCONTROL_V1_H
|
|
#define __MM_MEMCONTROL_V1_H
|
|
|
|
void memcg1_update_tree(struct mem_cgroup *memcg, int nid);
|
|
void memcg1_remove_from_trees(struct mem_cgroup *memcg);
|
|
|
|
static inline void memcg1_soft_limit_reset(struct mem_cgroup *memcg)
|
|
{
|
|
WRITE_ONCE(memcg->soft_limit, PAGE_COUNTER_MAX);
|
|
}
|
|
|
|
void mem_cgroup_charge_statistics(struct mem_cgroup *memcg, int nr_pages);
|
|
void memcg_check_events(struct mem_cgroup *memcg, int nid);
|
|
void memcg_oom_recover(struct mem_cgroup *memcg);
|
|
int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask,
|
|
unsigned int nr_pages);
|
|
|
|
static inline int try_charge(struct mem_cgroup *memcg, gfp_t gfp_mask,
|
|
unsigned int nr_pages)
|
|
{
|
|
if (mem_cgroup_is_root(memcg))
|
|
return 0;
|
|
|
|
return try_charge_memcg(memcg, gfp_mask, nr_pages);
|
|
}
|
|
|
|
void mem_cgroup_id_get_many(struct mem_cgroup *memcg, unsigned int n);
|
|
void mem_cgroup_id_put_many(struct mem_cgroup *memcg, unsigned int n);
|
|
|
|
bool memcg1_wait_acct_move(struct mem_cgroup *memcg);
|
|
struct cgroup_taskset;
|
|
int memcg1_can_attach(struct cgroup_taskset *tset);
|
|
void memcg1_cancel_attach(struct cgroup_taskset *tset);
|
|
void memcg1_move_task(void);
|
|
|
|
struct cftype;
|
|
u64 mem_cgroup_move_charge_read(struct cgroup_subsys_state *css,
|
|
struct cftype *cft);
|
|
int mem_cgroup_move_charge_write(struct cgroup_subsys_state *css,
|
|
struct cftype *cft, u64 val);
|
|
|
|
#endif /* __MM_MEMCONTROL_V1_H */
|