Skip to content

Commit

Permalink
psi-cgroup-support-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: please, no spaces at the start of a line
torvalds#250: FILE: kernel/cgroup/cgroup.c:4554:
+       {$

ERROR: code indent should use tabs where possible
torvalds#251: FILE: kernel/cgroup/cgroup.c:4555:
+               .name = "cpu.pressure",$

WARNING: please, no spaces at the start of a line
torvalds#251: FILE: kernel/cgroup/cgroup.c:4555:
+               .name = "cpu.pressure",$

ERROR: code indent should use tabs where possible
torvalds#252: FILE: kernel/cgroup/cgroup.c:4556:
+               .flags = CFTYPE_NOT_ON_ROOT,$

WARNING: please, no spaces at the start of a line
torvalds#252: FILE: kernel/cgroup/cgroup.c:4556:
+               .flags = CFTYPE_NOT_ON_ROOT,$

ERROR: code indent should use tabs where possible
torvalds#253: FILE: kernel/cgroup/cgroup.c:4557:
+               .seq_show = cgroup_cpu_pressure_show,$

WARNING: please, no spaces at the start of a line
torvalds#253: FILE: kernel/cgroup/cgroup.c:4557:
+               .seq_show = cgroup_cpu_pressure_show,$

WARNING: please, no spaces at the start of a line
torvalds#254: FILE: kernel/cgroup/cgroup.c:4558:
+       },$

WARNING: please, no spaces at the start of a line
torvalds#255: FILE: kernel/cgroup/cgroup.c:4559:
+       {$

ERROR: code indent should use tabs where possible
torvalds#256: FILE: kernel/cgroup/cgroup.c:4560:
+               .name = "memory.pressure",$

WARNING: please, no spaces at the start of a line
torvalds#256: FILE: kernel/cgroup/cgroup.c:4560:
+               .name = "memory.pressure",$

ERROR: code indent should use tabs where possible
torvalds#257: FILE: kernel/cgroup/cgroup.c:4561:
+               .flags = CFTYPE_NOT_ON_ROOT,$

WARNING: please, no spaces at the start of a line
torvalds#257: FILE: kernel/cgroup/cgroup.c:4561:
+               .flags = CFTYPE_NOT_ON_ROOT,$

ERROR: code indent should use tabs where possible
torvalds#258: FILE: kernel/cgroup/cgroup.c:4562:
+               .seq_show = cgroup_memory_pressure_show,$

WARNING: please, no spaces at the start of a line
torvalds#258: FILE: kernel/cgroup/cgroup.c:4562:
+               .seq_show = cgroup_memory_pressure_show,$

WARNING: please, no spaces at the start of a line
torvalds#259: FILE: kernel/cgroup/cgroup.c:4563:
+       },$

WARNING: please, no spaces at the start of a line
torvalds#260: FILE: kernel/cgroup/cgroup.c:4564:
+       {$

ERROR: code indent should use tabs where possible
torvalds#261: FILE: kernel/cgroup/cgroup.c:4565:
+               .name = "io.pressure",$

WARNING: please, no spaces at the start of a line
torvalds#261: FILE: kernel/cgroup/cgroup.c:4565:
+               .name = "io.pressure",$

ERROR: code indent should use tabs where possible
torvalds#262: FILE: kernel/cgroup/cgroup.c:4566:
+               .flags = CFTYPE_NOT_ON_ROOT,$

WARNING: please, no spaces at the start of a line
torvalds#262: FILE: kernel/cgroup/cgroup.c:4566:
+               .flags = CFTYPE_NOT_ON_ROOT,$

ERROR: code indent should use tabs where possible
torvalds#263: FILE: kernel/cgroup/cgroup.c:4567:
+               .seq_show = cgroup_io_pressure_show,$

WARNING: please, no spaces at the start of a line
torvalds#263: FILE: kernel/cgroup/cgroup.c:4567:
+               .seq_show = cgroup_io_pressure_show,$

WARNING: please, no spaces at the start of a line
torvalds#264: FILE: kernel/cgroup/cgroup.c:4568:
+       },$

WARNING: please, no spaces at the start of a line
torvalds#322: FILE: kernel/sched/psi.c:424:
+       cgroup = task->cgroups->dfl_cgrp;$

WARNING: please, no spaces at the start of a line
torvalds#323: FILE: kernel/sched/psi.c:425:
+       while (cgroup && (parent = cgroup_parent(cgroup))) {$

WARNING: suspect code indent for conditional statements (7, 15)
torvalds#323: FILE: kernel/sched/psi.c:425:
+       while (cgroup && (parent = cgroup_parent(cgroup))) {
+               struct psi_group *group;

ERROR: code indent should use tabs where possible
torvalds#324: FILE: kernel/sched/psi.c:426:
+               struct psi_group *group;$

WARNING: please, no spaces at the start of a line
torvalds#324: FILE: kernel/sched/psi.c:426:
+               struct psi_group *group;$

ERROR: code indent should use tabs where possible
torvalds#326: FILE: kernel/sched/psi.c:428:
+               group = cgroup_psi(cgroup);$

WARNING: please, no spaces at the start of a line
torvalds#326: FILE: kernel/sched/psi.c:428:
+               group = cgroup_psi(cgroup);$

ERROR: code indent should use tabs where possible
torvalds#327: FILE: kernel/sched/psi.c:429:
+               psi_group_change(group, cpu, now, clear, set);$

WARNING: please, no spaces at the start of a line
torvalds#327: FILE: kernel/sched/psi.c:429:
+               psi_group_change(group, cpu, now, clear, set);$

ERROR: code indent should use tabs where possible
torvalds#329: FILE: kernel/sched/psi.c:431:
+               cgroup = parent;$

WARNING: please, no spaces at the start of a line
torvalds#329: FILE: kernel/sched/psi.c:431:
+               cgroup = parent;$

WARNING: please, no spaces at the start of a line
torvalds#330: FILE: kernel/sched/psi.c:432:
+       }$

WARNING: braces {} are not necessary for any arm of this statement
torvalds#378: FILE: kernel/sched/psi.c:537:
+	if (task_on_rq_queued(task)) {
[...]
+	} else if (task->in_iowait) {
[...]

total: 13 errors, 24 warnings, 334 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/psi-cgroup-support.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
  • Loading branch information
akpm00 authored and sfrothwell committed Jul 14, 2018
1 parent 6e4efc3 commit 1a3fcf4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
30 changes: 15 additions & 15 deletions kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -4551,21 +4551,21 @@ static struct cftype cgroup_base_files[] = {
.seq_show = cpu_stat_show,
},
#ifdef CONFIG_PSI
{
.name = "cpu.pressure",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = cgroup_cpu_pressure_show,
},
{
.name = "memory.pressure",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = cgroup_memory_pressure_show,
},
{
.name = "io.pressure",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = cgroup_io_pressure_show,
},
{
.name = "cpu.pressure",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = cgroup_cpu_pressure_show,
},
{
.name = "memory.pressure",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = cgroup_memory_pressure_show,
},
{
.name = "io.pressure",
.flags = CFTYPE_NOT_ON_ROOT,
.seq_show = cgroup_io_pressure_show,
},
#endif
{ } /* terminate */
};
Expand Down
19 changes: 9 additions & 10 deletions kernel/sched/psi.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,15 @@ void psi_task_change(struct task_struct *task, u64 now, int clear, int set)
psi_group_change(&psi_system, cpu, now, clear, set);

#ifdef CONFIG_CGROUPS
cgroup = task->cgroups->dfl_cgrp;
while (cgroup && (parent = cgroup_parent(cgroup))) {
struct psi_group *group;
cgroup = task->cgroups->dfl_cgrp;
while (cgroup && (parent = cgroup_parent(cgroup))) {
struct psi_group *group;

group = cgroup_psi(cgroup);
psi_group_change(group, cpu, now, clear, set);
group = cgroup_psi(cgroup);
psi_group_change(group, cpu, now, clear, set);

cgroup = parent;
}
cgroup = parent;
}
#endif
}

Expand Down Expand Up @@ -535,11 +535,10 @@ void cgroup_move_task(struct task_struct *task, struct css_set *to)

rq = task_rq_lock(task, &rf);

if (task_on_rq_queued(task)) {
if (task_on_rq_queued(task))
task_flags = TSK_RUNNING;
} else if (task->in_iowait) {
else if (task->in_iowait)
task_flags = TSK_IOWAIT;
}
if (task->flags & PF_MEMSTALL)
task_flags |= TSK_MEMSTALL;

Expand Down

0 comments on commit 1a3fcf4

Please sign in to comment.