forked from TencentOS/TencentOS-kernel
sli: sli.monitor support cgroup v1
Signed-off-by: bauerchen <bauerchen@tencent.com> Reviewed-by: Bin Lai <robinlai@tencent.com>
This commit is contained in:
parent
34961244de
commit
9620012f40
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
#include <linux/cgroup-defs.h>
|
||||
#include <linux/sli.h>
|
||||
#include <linux/poll.h>
|
||||
|
||||
#ifdef CONFIG_CGROUPS
|
||||
|
||||
/*
|
||||
|
|
@ -970,4 +972,11 @@ void *cgroup_mbuf_next(struct seq_file *s, void *v, loff_t *pos);
|
|||
void cgroup_mbuf_stop(struct seq_file *s, void *v);
|
||||
int cgroup_mbuf_show(struct seq_file *s, void *v);
|
||||
|
||||
int cgroup_sli_monitor_open(struct kernfs_open_file *of);
|
||||
void *cgroup_sli_monitor_start(struct seq_file *s, loff_t *pos);
|
||||
int cgroup_sli_monitor_show(struct seq_file *seq, void *v);
|
||||
void *cgroup_sli_monitor_next(struct seq_file *s, void *v, loff_t *pos);
|
||||
void cgroup_sli_monitor_stop(struct seq_file *seq, void *v);
|
||||
__poll_t cgroup_sli_monitor_poll(struct kernfs_open_file *of, poll_table *pt);
|
||||
|
||||
#endif /* _LINUX_CGROUP_H */
|
||||
|
|
|
|||
|
|
@ -5031,32 +5031,32 @@ out_unlock:
|
|||
return ret ?: nbytes;
|
||||
}
|
||||
|
||||
static int cgroup_sli_monitor_open(struct kernfs_open_file *of)
|
||||
int cgroup_sli_monitor_open(struct kernfs_open_file *of)
|
||||
{
|
||||
return sli_monitor_open(of);
|
||||
}
|
||||
|
||||
static void *cgroup_sli_monitor_start(struct seq_file *s, loff_t *pos)
|
||||
void *cgroup_sli_monitor_start(struct seq_file *s, loff_t *pos)
|
||||
{
|
||||
return sli_monitor_start(s, pos);
|
||||
}
|
||||
|
||||
static int cgroup_sli_monitor_show(struct seq_file *seq, void *v)
|
||||
int cgroup_sli_monitor_show(struct seq_file *seq, void *v)
|
||||
{
|
||||
return sli_monitor_show(seq, v);
|
||||
}
|
||||
|
||||
static void *cgroup_sli_monitor_next(struct seq_file *s, void *v, loff_t *pos)
|
||||
void *cgroup_sli_monitor_next(struct seq_file *s, void *v, loff_t *pos)
|
||||
{
|
||||
return sli_monitor_next(s, v, pos);
|
||||
}
|
||||
|
||||
static void cgroup_sli_monitor_stop(struct seq_file *seq, void *v)
|
||||
void cgroup_sli_monitor_stop(struct seq_file *seq, void *v)
|
||||
{
|
||||
sli_monitor_stop(seq, v);
|
||||
}
|
||||
|
||||
static __poll_t cgroup_sli_monitor_poll(struct kernfs_open_file *of, poll_table *pt)
|
||||
__poll_t cgroup_sli_monitor_poll(struct kernfs_open_file *of, poll_table *pt)
|
||||
{
|
||||
return sli_monitor_poll(of, pt);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -410,6 +410,16 @@ static struct cftype files[] = {
|
|||
.write = cgroup_sli_control_write,
|
||||
.seq_show = cgroup_sli_control_show,
|
||||
},
|
||||
{
|
||||
.name = "sli.monitor",
|
||||
.flags = CFTYPE_NOT_ON_ROOT,
|
||||
.open = cgroup_sli_monitor_open,
|
||||
.seq_show = cgroup_sli_monitor_show,
|
||||
.seq_start = cgroup_sli_monitor_start,
|
||||
.seq_next = cgroup_sli_monitor_next,
|
||||
.seq_stop = cgroup_sli_monitor_stop,
|
||||
.poll = cgroup_sli_monitor_poll,
|
||||
},
|
||||
{ } /* terminate */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue