From: Peter Zijlstra <peterz@infradead.org>
To: Michael Wang <wangyun@linux.vnet.ibm.com>
Cc: Diwakar Tundlam <dtundlam@nvidia.com>,
"'Ingo Molnar'" <mingo@kernel.org>,
"'David Rientjes'" <rientjes@google.com>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>
Subject: Re: [PATCH] sched: Make nr_uninterruptible count a signed value
Date: Thu, 10 May 2012 11:46:06 +0200 [thread overview]
Message-ID: <1336643166.2527.86.camel@twins> (raw)
In-Reply-To: <4FAB38ED.5050200@linux.vnet.ibm.com>
Or something like the below.. I recently changed nr_running to int (see
c82513e51) so P(nr_running) would also benefit.
---
kernel/sched/debug.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 31e4f61..954fabf 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -260,8 +260,14 @@ static void print_cpu(struct seq_file *m, int cpu)
SEQ_printf(m, "\ncpu#%d\n", cpu);
#endif
-#define P(x) \
- SEQ_printf(m, " .%-30s: %Ld\n", #x, (long long)(rq->x))
+#define P(x) \
+do { \
+ if (sizeof(rq->x) == 4) \
+ SEQ_printf(m, " .%-30s: %ld\n", #x, (long)(rq->x)); \
+ else \
+ SEQ_printf(m, " .%-30s: %Ld\n", #x, (long long)(rq->x));\
+} while (0)
+
#define PN(x) \
SEQ_printf(m, " .%-30s: %Ld.%06ld\n", #x, SPLIT_NS(rq->x))
next prev parent reply other threads:[~2012-05-10 9:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 21:39 [PATCH] sched: Make nr_uninterruptible count a signed value Diwakar Tundlam
2012-05-08 21:56 ` Peter Zijlstra
2012-05-08 22:14 ` Diwakar Tundlam
2012-05-08 22:27 ` Peter Zijlstra
2012-05-08 22:29 ` Peter Zijlstra
2012-05-08 22:46 ` Diwakar Tundlam
2012-05-09 7:49 ` Michael Wang
2012-05-09 18:55 ` Diwakar Tundlam
2012-05-10 4:46 ` Michael Wang
2012-05-09 8:11 ` Peter Zijlstra
2012-05-09 19:04 ` Diwakar Tundlam
2012-05-10 3:41 ` Michael Wang
2012-05-10 9:46 ` Peter Zijlstra [this message]
2012-05-11 2:19 ` Michael Wang
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=1336643166.2527.86.camel@twins \
--to=peterz@infradead.org \
--cc=dtundlam@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pdeschrijver@nvidia.com \
--cc=rientjes@google.com \
--cc=wangyun@linux.vnet.ibm.com \
/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