From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf_counter: Prevent oopses from per-cpu software counters
Date: Fri, 06 Feb 2009 14:35:25 +0800 [thread overview]
Message-ID: <1233902125.2604.328.camel@ymzhang> (raw)
In-Reply-To: <18827.48582.613391.869829@cargo.ozlabs.ibm.com>
On Fri, 2009-02-06 at 15:34 +1100, Paul Mackerras wrote:
> Ingo Molnar writes:
>
> > So how about fixing these sw counts to properly work as percpu counters too?
>
> OK, so for page faults it looks like I want to look at
>
> get_cpu_var(vm_event_states).event[PGFAULT]
>
> to get the per-cpu page fault count, as long as
> CONFIG_VM_EVENT_COUNTERS is set.
>
> It looks like the scheduler doesn't keep per-cpu counts of context
> switches
rq->sched_switch or sched_count? sched_switch is defined, but not used. They
all depends on CONFIG_SCHEDSTATS=y.
> or task migrations, or if it does I couldn't find them. We
> could do stuff in perf_counter_task_sched_in/out to implement per-cpu
> context switch and migration counters by adding up the delta values
> for each task that gets scheduled onto the cpu. Or we could add
> explicit per-cpu counters for these things in the scheduler.
>
> What do you think?
>
> Paul.
next prev parent reply other threads:[~2009-02-06 6:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-05 4:52 [PATCH] perf_counter: Prevent oopses from per-cpu software counters Paul Mackerras
2009-02-05 14:22 ` Ingo Molnar
2009-02-06 2:40 ` Paul Mackerras
2009-02-06 4:34 ` Paul Mackerras
2009-02-06 6:35 ` Zhang, Yanmin [this message]
2009-02-06 15:31 ` Ingo Molnar
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=1233902125.2604.328.camel@ymzhang \
--to=yanmin_zhang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).