From: Andrew Morton <akpm@osdl.org>
To: balbir@in.ibm.com
Cc: linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net,
jlan@engr.sgi.com
Subject: Re: [Patch 3/8] cpu delay collection via schedstats
Date: Mon, 8 May 2006 14:26:40 -0700 [thread overview]
Message-ID: <20060508142640.675665c7.akpm@osdl.org> (raw)
In-Reply-To: <20060502061505.GN13962@in.ibm.com>
Balbir Singh <balbir@in.ibm.com> wrote:
>
> +/*
> + * Expects runqueue lock to be held for atomicity of update
> + */
> +static inline void rq_sched_info_arrive(struct runqueue *rq,
> + unsigned long diff)
> +{
> + if (rq) {
> + rq->rq_sched_info.run_delay += diff;
> + rq->rq_sched_info.pcnt++;
> + }
> +}
> +
> +/*
> + * Expects runqueue lock to be held for atomicity of update
> + */
> +static inline void rq_sched_info_depart(struct runqueue *rq,
> + unsigned long diff)
> +{
> + if (rq)
> + rq->rq_sched_info.cpu_time += diff;
> +}
The kernel has many different units of time - jiffies, cpu ticks, ns, us,
ms, etc. So the reader of these functions doesn't have a clue what "diff"
is.
A good way to remove all doubt in all cases is to include the units in the
variable's name. Something like delta_jiffies, perhaps.
next prev parent reply other threads:[~2006-05-08 21:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 6:15 Balbir Singh
2006-05-08 21:26 ` Andrew Morton [this message]
2006-05-09 4:00 ` Balbir Singh
2006-05-10 10:24 ` [PATCH][delayacct] Use better names in schedstats (was Re: [Patch 3/8] cpu delay collection via schedstats) Balbir Singh
-- strict thread matches above, loose matches on Subject: below --
2006-04-22 2:16 [Patch 0/8] per-task delay accounting Shailabh Nagar
2006-04-22 2:33 ` [Patch 3/8] cpu delay collection via schedstats Shailabh Nagar
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=20060508142640.675665c7.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=balbir@in.ibm.com \
--cc=jlan@engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
/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
Powered by JetHome