From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Venkatesh Pallipadi <venki@google.com>
Subject: Re: [PATCH 0/4] cputime: Virtual cputime accounting small cleanups and consolidation
Date: Thu, 21 Jun 2012 09:58:06 +0200 [thread overview]
Message-ID: <20120621095806.36df58f2@de.ibm.com> (raw)
In-Reply-To: <CAFTL4hz9UZr0Xfd4m3WTBma8vSvbm0Lg8o=oXsjFbpPfG9RxjQ@mail.gmail.com>
On Thu, 21 Jun 2012 02:46:29 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:
> 2012/6/21 Peter Zijlstra <peterz@infradead.org>:
> > On Tue, 2012-06-19 at 15:43 +0200, Frederic Weisbecker wrote:
> >>
> >> I wish we could do more vtime cputime accounting consolidation
> >> but archs do the things pretty differently although I bet the
> >> behaviour could be more unified.
> >>
> > Yes.. so s390,ia64 use thread_info, ppc uses their paca (arch private
> > precursor to per-cpu data).
s390 uses the prefix page / lowcore to accumulate some accounting information.
Which basically is per-cpu data with the advantage that it is accessible with
at address 0-8191 for each cpu. The entry code does not have to load a pointer
to get to that page, I would prefer NOT to use per-cpu data here.
> > So I understand why s390,ia64 want the sched hook, but I don't see why
> > ppc would need it, their account_process_tick() can fold whatever they
> > need on the tick.
>
> I think in any case you need to flush the time on a descheduling task otherwise
> its pending time will be accounted later to the next task when it
> receives an irq.
>
> So I fear we still need that sched switch hook even with per cpu data. This
> may be a simple account_system_vtime() call.
Indeed, the scheduler hook is needed to add the accumulated values to the
correct task.
> > So I think reworking s390,ia64 to use per-cpu storage should get rid of
> > this switch hook altogether.
If we get rid of the switch hook then the quality of the accounting numbers
will get significantly worse. Think of the scenario of a long running
background process and a task that repeatedly wakes up for a very short
time. Without the scheduler hook chances are good that the background task
is accounted all the accumulated user time.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2012-06-21 7:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 13:43 [PATCH 0/4] cputime: Virtual cputime accounting small cleanups and consolidation Frederic Weisbecker
2012-06-19 13:43 ` [PATCH 1/4] cputime: Generalize CONFIG_VIRT_CPU_ACCOUNTING Frederic Weisbecker
2012-06-19 13:43 ` [PATCH 2/4] sched: Move cputime code to its own file Frederic Weisbecker
2012-06-19 13:43 ` [PATCH 3/4] cputime: Consolidate vtime handling on context switch Frederic Weisbecker
2012-06-19 13:43 ` [PATCH 4/4] s390: Remove leftover account_tick_vtime() header Frederic Weisbecker
2012-06-19 18:55 ` [PATCH 0/4] cputime: Virtual cputime accounting small cleanups and consolidation Luck, Tony
2012-06-20 22:26 ` Peter Zijlstra
2012-06-21 0:46 ` Frederic Weisbecker
2012-06-21 7:58 ` Martin Schwidefsky [this message]
2012-06-21 12:04 ` Peter Zijlstra
2012-06-21 16:37 ` Frederic Weisbecker
2012-06-21 8:30 ` Peter Zijlstra
2012-06-21 8:53 ` Peter Zijlstra
2012-07-09 17:50 ` Frederic Weisbecker
2012-07-09 21:03 ` Benjamin Herrenschmidt
2012-08-03 11:12 ` Frederic Weisbecker
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=20120621095806.36df58f2@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=fenghua.yu@intel.com \
--cc=fweisbec@gmail.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=venki@google.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