From: Vincent Guittot <vincent.guittot@linaro.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Jonathan Corbet <corbet@lwn.net>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Ben Segall <bsegall@google.com>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Mel Gorman <mgorman@suse.de>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 24/27] shed: fix kernel-doc markup
Date: Mon, 16 Nov 2020 13:34:07 +0100 [thread overview]
Message-ID: <CAKfTPtCBK6M4mgbEP1rt+qqZ_FKzDg9yd9bMg+MdtUmEYWX6+g@mail.gmail.com> (raw)
In-Reply-To: <7cf5d2691e70ab82c332a335d21f6f04c0f742ab.1605521731.git.mchehab+huawei@kernel.org>
On Mon, 16 Nov 2020 at 11:18, Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
s/shed/sched
> Kernel-doc requires that a kernel-doc markup to be immediatly
s/immediatly/immediately
> below the function prototype, as otherwise it will rename it.
> So, move sys_sched_yield() markup to the right place.
>
> Also fix the cpu_util() markup: Kernel-doc markups
> should use this format:
> identifier - description
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
> kernel/sched/core.c | 16 ++++++++--------
> kernel/sched/fair.c | 2 +-
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 02076e6d3792..9d41378ae8f3 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6560,65 +6560,65 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
> if (len & (sizeof(unsigned long)-1))
> return -EINVAL;
>
> if (!alloc_cpumask_var(&mask, GFP_KERNEL))
> return -ENOMEM;
>
> ret = sched_getaffinity(pid, mask);
> if (ret == 0) {
> unsigned int retlen = min(len, cpumask_size());
>
> if (copy_to_user(user_mask_ptr, mask, retlen))
> ret = -EFAULT;
> else
> ret = retlen;
> }
> free_cpumask_var(mask);
>
> return ret;
> }
>
> -/**
> - * sys_sched_yield - yield the current processor to other threads.
> - *
> - * This function yields the current CPU to other tasks. If there are no
> - * other threads running on this CPU then this function will return.
> - *
> - * Return: 0.
> - */
> static void do_sched_yield(void)
> {
> struct rq_flags rf;
> struct rq *rq;
>
> rq = this_rq_lock_irq(&rf);
>
> schedstat_inc(rq->yld_count);
> current->sched_class->yield_task(rq);
>
> preempt_disable();
> rq_unlock_irq(rq, &rf);
> sched_preempt_enable_no_resched();
>
> schedule();
> }
>
> +/**
> + * sys_sched_yield - yield the current processor to other threads.
> + *
> + * This function yields the current CPU to other tasks. If there are no
> + * other threads running on this CPU then this function will return.
> + *
> + * Return: 0.
> + */
> SYSCALL_DEFINE0(sched_yield)
> {
> do_sched_yield();
> return 0;
> }
>
> #ifndef CONFIG_PREEMPTION
> int __sched _cond_resched(void)
> {
> if (should_resched(0)) {
> preempt_schedule_common();
> return 1;
> }
> rcu_all_qs();
> return 0;
> }
> EXPORT_SYMBOL(_cond_resched);
> #endif
>
> /*
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 27536f37ba1a..cb7cd7d8a28f 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6310,41 +6310,41 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
> sd = rcu_dereference(per_cpu(sd_llc, target));
> if (!sd)
> return target;
>
> i = select_idle_core(p, sd, target);
> if ((unsigned)i < nr_cpumask_bits)
> return i;
>
> i = select_idle_cpu(p, sd, target);
> if ((unsigned)i < nr_cpumask_bits)
> return i;
>
> i = select_idle_smt(p, sd, target);
> if ((unsigned)i < nr_cpumask_bits)
> return i;
>
> return target;
> }
>
> /**
> - * Amount of capacity of a CPU that is (estimated to be) used by CFS tasks
> + * cpu_util - Estimates the amount of capacity of a CPU used by CFS tasks.
> * @cpu: the CPU to get the utilization of
> *
> * The unit of the return value must be the one of capacity so we can compare
> * the utilization with the capacity of the CPU that is available for CFS task
> * (ie cpu_capacity).
> *
> * cfs_rq.avg.util_avg is the sum of running time of runnable tasks plus the
> * recent utilization of currently non-runnable tasks on a CPU. It represents
> * the amount of utilization of a CPU in the range [0..capacity_orig] where
> * capacity_orig is the cpu_capacity available at the highest frequency
> * (arch_scale_freq_capacity()).
> * The utilization of a CPU converges towards a sum equal to or less than the
> * current capacity (capacity_curr <= capacity_orig) of the CPU because it is
> * the running time on this CPU scaled by capacity_curr.
> *
> * The estimated utilization of a CPU is defined to be the maximum between its
> * cfs_rq.avg.util_avg and the sum of the estimated utilization of the tasks
> * currently RUNNABLE on that CPU.
> * This allows to properly represent the expected utilization of a CPU which
> * has just got a big task running since a long sleep period. At the same time
> --
> 2.28.0
>
next prev parent reply other threads:[~2020-11-16 12:38 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 10:17 [PATCH v4 00/27]Fix several bad kernel-doc markups Mauro Carvalho Chehab
2020-11-16 10:17 ` [PATCH v4 01/27] net: phy: fix " Mauro Carvalho Chehab
2020-11-16 10:17 ` [PATCH v4 02/27] net: datagram: fix some " Mauro Carvalho Chehab
2020-11-16 10:20 ` Kirill Tkhai
2020-11-16 10:17 ` [PATCH v4 03/27] net: core: " Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 04/27] s390: fix " Mauro Carvalho Chehab
2020-11-16 10:25 ` Cornelia Huck
2020-11-16 10:38 ` Vineeth Vijayan
2020-11-16 12:04 ` Vineeth Vijayan
2020-11-16 10:18 ` [PATCH v4 05/27] drm: fix some " Mauro Carvalho Chehab
2020-11-16 11:37 ` Jani Nikula
2020-11-16 19:48 ` Daniel Vetter
2020-11-16 10:18 ` [PATCH v4 06/27] HSI: fix a kernel-doc markup Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 07/27] IB: fix kernel-doc markups Mauro Carvalho Chehab
2020-11-16 10:36 ` Gustavo A. R. Silva
2020-11-23 23:45 ` Jason Gunthorpe
2020-12-01 11:39 ` Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 08/27] parport: fix a kernel-doc markup Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 09/27] rapidio: fix kernel-doc a markup Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 10/27] video: fix some kernel-doc markups Mauro Carvalho Chehab
2020-11-16 15:36 ` Daniel Vetter
2020-11-16 16:38 ` Mauro Carvalho Chehab
2020-11-16 17:24 ` Daniel Vetter
2020-11-16 18:11 ` Sam Ravnborg
2020-11-16 19:43 ` Daniel Vetter
2020-11-16 18:42 ` Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 11/27] fs: fix " Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 12/27] jbd2: " Mauro Carvalho Chehab
2020-11-20 3:38 ` Theodore Y. Ts'o
2020-11-16 10:18 ` [PATCH v4 13/27] pstore/zone: fix a kernel-doc markup Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 14/27] completion: fix kernel-doc markups Mauro Carvalho Chehab
2020-11-16 11:36 ` Peter Zijlstra
2020-11-16 10:18 ` [PATCH v4 15/27] firmware: stratix10-svc: " Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 16/27] connector: fix a kernel-doc markup Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 17/27] lib/crc7: " Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 18/27] hrtimer: fix kernel-doc markups Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 19/27] genirq: " Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 20/27] list: fix a typo at the kernel-doc markup Mauro Carvalho Chehab
2020-11-16 19:57 ` Paul E. McKenney
2020-11-16 10:18 ` [PATCH v4 21/27] memblock: fix kernel-doc markups Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 22/27] w1: fix a kernel-doc markup Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 23/27] resource: fix kernel-doc markups Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 24/27] shed: fix kernel-doc markup Mauro Carvalho Chehab
2020-11-16 12:34 ` Vincent Guittot [this message]
2020-11-16 10:18 ` [PATCH v4 25/27] mm: fix kernel-doc markups Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 26/27] selftests: kselftest_harness.h: partially " Mauro Carvalho Chehab
2020-11-16 10:18 ` [PATCH v4 27/27] scripts: kernel-doc: validate kernel-doc markup with the actual names Mauro Carvalho Chehab
2020-11-16 15:06 ` kernel test robot
2020-11-16 15:42 ` kernel test robot
2020-11-16 15:51 ` kernel test robot
2020-11-17 22:19 ` [PATCH v4 00/27]Fix several bad kernel-doc markups Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKfTPtCBK6M4mgbEP1rt+qqZ_FKzDg9yd9bMg+MdtUmEYWX6+g@mail.gmail.com \
--to=vincent.guittot@linaro.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=corbet@lwn.net \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).