From: Balbir Singh <balbir@in.ibm.com>
To: "Mauricio Lin" <mauriciolin@gmail.com>
Cc: nagar@watson.ibm.com, linux-kernel <linux-kernel@vger.kernel.org>,
"Nick Piggin" <nickpiggin@yahoo.com.au>
Subject: Re: schedstats: sched_info_switch() invocation without checking (prev != next) before
Date: Sat, 29 Apr 2006 02:11:16 +0530 [thread overview]
Message-ID: <20060428204116.GA8301@in.ibm.com> (raw)
In-Reply-To: <3f250c710604281216k79ebe2c8ie63fb337cec8481a@mail.gmail.com>
>
> Look that sched_info_switch() is being invoked before verifying if the
> prev and next tasks are different or not. IMHO the more logical place
> to put sched_info_switch() function is inside the if (likely(prev !=
> next) { } block according to the comments mentioned previously.
>
> Any comments?
>
Yes, I think your analysis seems correct. There is an advantages
to calling sched_info_switch() before checking for prev != next in
the if (likely()).
if prev == next, sched_info_switch() updates the task and runqueue statistics
information (that helps keeping it up to date). This might be useful
for SCHED_FIFO.
--
<--- Balbir
prev parent reply other threads:[~2006-04-28 20:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-28 19:16 schedstats: sched_info_switch() invocation without checking (prev != next) before Mauricio Lin
2006-04-28 20:41 ` Balbir Singh [this message]
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=20060428204116.GA8301@in.ibm.com \
--to=balbir@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mauriciolin@gmail.com \
--cc=nagar@watson.ibm.com \
--cc=nickpiggin@yahoo.com.au \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.