From: Zhao Lei <zhaolei@cn.fujitsu.com>
To: "'Srikar Dronamraju'" <srikar@linux.vnet.ibm.com>,
"'Anton Blanchard'" <anton@samba.org>
Cc: "'Peter Zijlstra'" <peterz@infradead.org>,
"'Ingo Molnar'" <mingo@kernel.org>, <tglx@linutronix.de>,
<efault@gmx.de>, <htejun@gmail.com>,
<linux-kernel@vger.kernel.org>, <tj@kernel.org>,
<torvalds@linux-foundation.org>, <yangds.fnst@cn.fujitsu.com>,
<hpa@zytor.com>, "'Stephen Rothwell'" <sfr@canb.auug.org.au>,
"'Michael Ellerman'" <mpe@ellerman.id.au>,
<linuxppc-dev@lists.ozlabs.org>
Subject: RE: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()
Date: Thu, 7 Apr 2016 01:05:52 +0800 [thread overview]
Message-ID: <000101d19026$94249f00$bc6ddd00$@cn.fujitsu.com> (raw)
In-Reply-To: <20160406132637.GA2108@linux.vnet.ibm.com>
> -----Original Message-----
> From: Srikar Dronamraju [mailto:srikar@linux.vnet.ibm.com]
> Sent: Wednesday, April 06, 2016 9:27 PM
> To: Anton Blanchard <anton@samba.org>
> Cc: Peter Zijlstra <peterz@infradead.org>; Ingo Molnar <mingo@kernel.org>;
> tglx@linutronix.de; efault@gmx.de; htejun@gmail.com;
> linux-kernel@vger.kernel.org; tj@kernel.org; torvalds@linux-foundation.org;
> zhaolei@cn.fujitsu.com; yangds.fnst@cn.fujitsu.com; hpa@zytor.com; Stephen
> Rothwell <sfr@canb.auug.org.au>; Michael Ellerman <mpe@ellerman.id.au>;
> linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs()
>
> * Anton Blanchard <anton@samba.org> [2016-04-06 21:59:50]:
>
> > Looks good, and the patch below does fix the oops for me.
> >
> > Anton
> > --
> >
> > task_pt_regs() can return NULL for kernel threads, so add a check.
> > This fixes an oops at boot on ppc64.
> >
> > Signed-off-by: Anton Blanchard <anton@samba.org>
>
> Works for me too.
>
> Reported-and-Tested-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
>
Thanks, all
I tested it in the vm(can not boot before fix):
[single cpu]
# for f in cpuacct.*; do echo "$f: "; cat $f; done
cpuacct.stat:
user 260
system 451
cpuacct.usage:
6923456654
cpuacct.usage_percpu:
6963446178
cpuacct.usage_percpu_sys:
2610934362
cpuacct.usage_percpu_user:
4451667140
cpuacct.usage_sys:
2612684054
cpuacct.usage_user:
4540275322
#
[2 cpu wih 8 maxcpus]
# for f in cpuacct.*; do echo "$f: "; cat $f; done
cpuacct.stat:
user 205
system 536
cpuacct.usage:
7293688020
cpuacct.usage_percpu:
3785674990 3551323200 0 0 0 0 0 0
cpuacct.usage_percpu_sys:
2227281124 1635060584 0 0 0 0 0 0
cpuacct.usage_percpu_user:
1567487176 1992278818 0 0 0 0 0 0
cpuacct.usage_sys:
3863445982
cpuacct.usage_user:
3643874038
#
# cat /proc/cpuinfo
processor : 0
cpu : POWER7 (raw), altivec supported
clock : 1000.000000MHz
revision : 2.3 (pvr 003f 0203)
processor : 1
cpu : POWER7 (raw), altivec supported
clock : 1000.000000MHz
revision : 2.3 (pvr 003f 0203)
timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
#
Thanks
Zhaolei
> --
> Thanks and Regards
> Srikar Dronamraju
>
next prev parent reply other threads:[~2016-04-06 17:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 8:37 [PATCH v4 0/4] cpuacct: split usage into user_usage and sys_usage Zhao Lei
2016-03-22 8:37 ` [PATCH v4 1/4] cpuacct: rename parameter in cpuusage_write for readability Zhao Lei
2016-03-22 8:37 ` [PATCH v4 2/4] cpuacct: small restruct for cpuacct Zhao Lei
2016-03-22 8:37 ` [PATCH v4 3/4] cpuacct: Show possible_cpu in cpuacct Zhao Lei
2016-03-31 9:27 ` [tip:sched/core] sched/cpuacct: Show all possible CPUs in cpuacct output tip-bot for Zhao Lei
2016-03-22 8:37 ` [PATCH v4 4/4] cpuacct: split usage into user_usage and sys_usage Zhao Lei
2016-03-31 9:27 ` [tip:sched/core] sched/cpuacct: Split usage accounting " tip-bot for Dongsheng Yang
2016-04-04 14:03 ` Srikar Dronamraju
2016-04-06 6:54 ` Ingo Molnar
2016-04-06 7:47 ` Zhao Lei
2016-04-06 7:50 ` Peter Zijlstra
2016-04-06 10:32 ` Anton Blanchard
2016-04-06 11:08 ` Peter Zijlstra
2016-04-06 11:43 ` Zhao Lei
2016-04-06 11:59 ` [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs() Anton Blanchard
2016-04-06 13:26 ` Srikar Dronamraju
2016-04-06 17:05 ` Zhao Lei [this message]
2016-04-13 7:43 ` Ingo Molnar
2016-04-13 11:01 ` Michael Ellerman
2016-04-13 11:21 ` Ingo Molnar
2016-04-11 6:16 ` Ping? " Michael Ellerman
2016-04-13 11:49 ` [tip:sched/core] " tip-bot for Anton Blanchard
2016-03-22 9:44 ` [PATCH v4 0/4] cpuacct: split usage into user_usage and sys_usage Peter Zijlstra
2016-04-13 8:17 [PATCH] sched/cpuacct: Check for NULL when using task_pt_regs() Anton Blanchard
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='000101d19026$94249f00$bc6ddd00$@cn.fujitsu.com' \
--to=zhaolei@cn.fujitsu.com \
--cc=anton@samba.org \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=htejun@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=yangds.fnst@cn.fujitsu.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
Powered by JetHome