From: c00423981 <caomeng5@huawei.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
<x86@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpustat: print watchdog time and statistics of soft and hard interrupts in soft lockup scenes
Date: Wed, 21 Aug 2019 16:26:17 +0800 [thread overview]
Message-ID: <4eb6b499-b6b0-602a-ae89-0c1dceaa5088@huawei.com> (raw)
In-Reply-To: <20190820110430.GL2332@hirez.programming.kicks-ass.net>
Sorry, I cannot understand this problem accurately. I try to understand it and I guess what you want
to express is that the return value type should be cputime64_t but not u64, just like as follows:
+static cputime64_t cpustat_curr_cputime(int cpu, int index)
+{
+ cputime64_t time;
+
+ if (index == CPUTIME_IDLE)
+ time = get_idle_time(cpu);
+ else if (index == CPUTIME_IOWAIT)
+ time = get_iowait_time(cpu);
I don't know if I understand it correctly. Looking forward to your answer.
On 2019/8/20 19:04, Peter Zijlstra wrote:
> On Mon, Aug 19, 2019 at 03:12:24PM +0800, c00423981 wrote:
>> +static u64 cpustat_curr_cputime(int cpu, int index)
>> +{
>> + u64 time;
>> +
>> + if (index == CPUTIME_IDLE)
>> + time = get_idle_time(cpu);
>> + else if (index == CPUTIME_IOWAIT)
>> + time = get_iowait_time(cpu);
>
> NAK; don't add new users of this terminally broken interface.
>
>
next prev parent reply other threads:[~2019-08-21 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 7:12 c00423981
2019-08-20 11:04 ` Peter Zijlstra
2019-08-21 8:26 ` c00423981 [this message]
2019-08-21 10:46 ` Peter Zijlstra
2019-08-22 11:58 ` [PATCH V2] " c00423981
2019-08-22 16:14 ` Peter Zijlstra
2019-08-23 7:26 ` c00423981
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=4eb6b499-b6b0-602a-ae89-0c1dceaa5088@huawei.com \
--to=caomeng5@huawei.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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®