The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Venkatesh Pallipadi <venki@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Paul Menage <menage@google.com>,
	linux-kernel@vger.kernel.org, Paul Turner <pjt@google.com>
Subject: Re: [RFC PATCH 1/4] sched: Track and export per task [hard|soft]irq time
Date: Tue, 25 May 2010 14:43:00 +0530	[thread overview]
Message-ID: <20100525091300.GN3519@balbir.in.ibm.com> (raw)
In-Reply-To: <1274746282-21533-2-git-send-email-venki@google.com>

* Venkatesh Pallipadi <venki@google.com> [2010-05-24 17:11:19]:

> Currently, kernel does not have accounting mechanism for softirq and hardirq
> times at the task level. There is irq time info in kstat_cpu which is
> accumulated at the cpu level.
> 
> Without the task level information, the non irq run time of task(s) would
> have to be guessed based on their exec time and CPU on which they were
> running recently and assuming that the CPU irq time reported are spread
> across all the tasks running there. And this guess can be widely off the mark.
> 
> Sample case, considering just the softirq:
> 
> If there are varied workloads running on a CPU, say a CPU bound task (loop)
> and a network IO bound task (nc) along with the network softirq load,
> there is no way for the administrator/user to know the non-irq runtime of each
> of these tasks. Only information available is the total runtime for each of the
> tasks and kstat_cpu softirq time for the CPU.
> 
> In this example, considering a 10 second sample, both loop and nc would have
> total run time of ~5s. And kstat_cpu softirq on this cpu increase was
> 355 (~3.5s).
> 
> So, all the information the user gets is that both the tasks are running for
> roughly the same amount of time and softirq is around 35%. As a result user
> may conclude that irq overhead for both tasks are equal (1.75s) and the
> non-irq runtime of both the tasks are around ~3.25s. Yes. There is another
> factor of system and user time reported for these tasks that I am ignoring
> as that is tough to correlate with irq time, in cases where the tasks have
> significant non-irq system time.
> 
> This change adds tracking of softirq time on each task and task group.
> This information is exported in /proc/<pid>/stat.
> 
> So, the user can get info like below, looking at exec_time and si_time in
> appropriate /proc/<pid>/stat.
> (Taken for a 10s interval)
> task exec_time softirqtime (in USER_HZ)
> (loop)  (nc)
> 505 0   500 359
> 502 1   501 363
> 503 0   502 354
> 504 0   499 359
> 503 3   500 360
> 
> with this, user can get the non-irq run time as 5s and ~1.45s for
> loop and nc, respectively.

Have you noticed any overheads after these changes? Otherwise, the
changes look correct to me.


-- 
	Three Cheers,
	Balbir

  parent reply	other threads:[~2010-05-25  9:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  0:11 [RFC PATCH 0/4] Finer granularity and task/cgroup irq time accounting Venkatesh Pallipadi
2010-05-25  0:11 ` [RFC PATCH 1/4] sched: Track and export per task [hard|soft]irq time Venkatesh Pallipadi
2010-05-25  0:11   ` [RFC PATCH 2/4] x86: Add IRQ_TIME_ACCOUNTING, finer accounting of irq time to task Venkatesh Pallipadi
2010-05-25  0:11     ` [RFC PATCH 3/4] sched: Generalize cpuacct usage tracking making it simpler to add new stats Venkatesh Pallipadi
2010-05-25  0:11       ` [RFC PATCH 4/4] sched: Export irq times through cpuacct cgroup Venkatesh Pallipadi
2010-05-25  6:35     ` [RFC PATCH 2/4] x86: Add IRQ_TIME_ACCOUNTING, finer accounting of irq time to task Peter Zijlstra
2010-05-25 21:40       ` Venkatesh Pallipadi
2010-05-26  6:54         ` Peter Zijlstra
2010-05-25  9:13   ` Balbir Singh [this message]
2010-05-25 21:45     ` [RFC PATCH 1/4] sched: Track and export per task [hard|soft]irq time Venkatesh Pallipadi
2010-05-25  7:00 ` [RFC PATCH 0/4] Finer granularity and task/cgroup irq time accounting Balbir Singh
2010-05-25  8:14 ` Peter Zijlstra
2010-05-25 17:05   ` Venkatesh Pallipadi

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=20100525091300.GN3519@balbir.in.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=tglx@linutronix.de \
    --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