From: "George Spelvin" <linux@horizon.com>
To: jason.low2@hp.com
Cc: akpm@linux-foundation.org, linux@horizon.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] timer: Optimize fastpath_timer_check()
Date: 26 Aug 2015 12:57:57 -0400 [thread overview]
Message-ID: <20150826165757.3001.qmail@ns.horizon.com> (raw)
> if (!task_cputime_zero(&tsk->cputime_expires)) {
>+ struct task_cputime task_sample;
>+ cputime_t utime, stime;
>+
>+ task_cputime(tsk, &utime, &stime);
>+ task_sample.utime = utime;
>+ task_sample.stime = stime;
>+ task_sample.sum_exec_runtime = tsk->se.sum_exec_runtime;
Er, task_sample.[us]time are already the correct types.
Whay are the local variables necessary? How about:
if (!task_cputime_zero(&tsk->cputime_expires)) {
+ struct task_cputime task_sample;
+
+ task_cputime(tsk, &task_simple.utime, &task_simple.stime);
+ task_sample.sum_exec_runtime = tsk->se.sum_exec_runtime;
next reply other threads:[~2015-08-26 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 16:57 George Spelvin [this message]
2015-08-26 17:31 ` Jason Low
-- strict thread matches above, loose matches on Subject: below --
2015-08-26 3:17 [PATCH 0/3] timer: Improve itimers scalability Jason Low
2015-08-26 3:17 ` [PATCH 1/3] timer: Optimize fastpath_timer_check() Jason Low
2015-08-26 21:57 ` Frederic Weisbecker
2015-08-31 15:15 ` Davidlohr Bueso
2015-08-31 19:40 ` Jason Low
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=20150826165757.3001.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=akpm@linux-foundation.org \
--cc=jason.low2@hp.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®