[Devel] [PATCH 3/7] perf: add ability to change event according to sample (v2)

2011-11-28 Thread Andrew Vagin
It's opposition of perf_session__parse_sample. v2: fixed mistakes which David Arhen found Signed-off-by: Andrew Vagin --- tools/perf/util/event.h |2 + tools/perf/util/evsel.c | 74 + tools/perf/util/session.h |9 + 3 files changed,

[Devel] [PATCH 0/7] Profiling sleep times (v3)

2011-11-28 Thread Andrew Vagin
Do you want to know where your code waits locks for a long time? Yes! It's for you. This feature helps you to find bottlenecks. It's not artificial task. Once one of my colleague was investigating a scalability problem. He pressed sysrq-t some times and tried to merge call-chains by hand. But perf

[Devel] [PATCH 6/7] perf: add scripts for profiling sleep times (v2)

2011-11-28 Thread Andrew Vagin
E.g.: # perf script record -- sched:sched_stat_sleep -- ./foo # perf script report sched-stat or # perf script record -- -e sched:sched_stat_sleep v2: Add ability to record events for a defined process. It executes a small bash script, then executes perf with filtering by pid and then a bash sc

[Devel] [PATCH 2/7] perf: add ability to record event period

2011-11-28 Thread Andrew Vagin
Signed-off-by: Andrew Vagin --- tools/perf/builtin-record.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 6ab58cc..e3b7fc4 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -

[Devel] [PATCH 5/7] perf: teach perf inject to merge sched_stat_* and sched_switch events

2011-11-28 Thread Andrew Vagin
You may want to know where and how long a task is sleeping. A callchain may be found in sched_switch and a time slice in stat_iowait, so I add handler in perf inject for merging this events. My code saves sched_switch event for each process and when it meets stat_iowait, it reports the sched_switc

[Devel] [PATCH 1/7] perf: use event_name() to get an event name

2011-11-28 Thread Andrew Vagin
perf_evsel.name may be not initialized Signed-off-by: Andrew Vagin --- tools/perf/util/header.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index bcd05d0..33c17a2 100644 --- a/tools/perf/util/header.c +++ b/tools/p

[Devel] [PATCH 4/7] perf: teach "perf inject" to work with files

2011-11-28 Thread Andrew Vagin
Before this patch "perf inject" can only handle data from pipe. I want to use "perf inject" for reworking events. Look at my following patch. Signed-off-by: Andrew Vagin --- tools/perf/builtin-inject.c | 33 +++-- 1 files changed, 31 insertions(+), 2 deletions(-)

[Devel] [PATCH 7/7] event: add tracepoint for accounting block time

2011-11-28 Thread Andrew Vagin
This tracepoint shows how long a task is sleeping in uninterruptible state. E.g. It may show how long and where a mutex is waited. Signed-off-by: Andrew Vagin --- include/trace/events/sched.h |7 +++ kernel/sched_fair.c |2 ++ 2 files changed, 9 insertions(+), 0 deletions(-

[Devel] Re: [PATCH v6 10/10] Disable task moving when using kernel memory accounting

2011-11-28 Thread Glauber Costa
On 11/28/2011 02:32 AM, KAMEZAWA Hiroyuki wrote: On Fri, 25 Nov 2011 15:38:16 -0200 Glauber Costa wrote: Since this code is still experimental, we are leaving the exact details of how to move tasks between cgroups when kernel memory accounting is used as future work. For now, we simply disall

[Devel] Re: [PATCH v6 01/10] Basic kernel memory functionality for the Memory Controller

2011-11-28 Thread Glauber Costa
On 11/28/2011 12:24 AM, KAMEZAWA Hiroyuki wrote: On Fri, 25 Nov 2011 15:38:07 -0200 Glauber Costa wrote: This patch lays down the foundation for the kernel memory component of the Memory Controller. As of today, I am only laying down the following files: * memory.independent_kmem_limit *

[Devel] Re: [PATCH 7/7] event: add tracepoint for accounting block time

2011-11-28 Thread Peter Zijlstra
On Mon, 2011-11-28 at 12:03 +0300, Andrew Vagin wrote: > This tracepoint shows how long a task is sleeping in uninterruptible state. > > E.g. > It may show how long and where a mutex is waited. Fair enough, makes one wonder how much it would take to make account_scheduler_latency() go away.. > S

[Devel] [PATCH 0/6] NFS: create clients and IDMAP pipes per network namespace

2011-11-28 Thread Stanislav Kinsbursky
This patch set was created in context of clone of git branch: git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git. tag: v3.1 This patch set depends on previous patch sets titled: 1) "SUNRPC: initial part of making pipefs work in net ns" 2) "SUNPRC: cleanup PipeFS for network-namespace-aware users

[Devel] [PATCH 4/6] NFS: create callback transports in parent transport network namespace

2011-11-28 Thread Stanislav Kinsbursky
This patch replaces static "init_net" references with parent transport xprt_net reference. Thus callback transports will be created in the same network namespace as respective NFS mount point was created. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c | 10 +- 1 files chang

[Devel] [PATCH 2/6] NFS: make NFS client allocated per network namespace context

2011-11-28 Thread Stanislav Kinsbursky
This patch adds new net variable to nfs_client structure. This variable is set on NFS client creation and cheched during matching NFS client search. Initially current->nsproxy->net_ns is used as network namespace owner for new NFS client to create. This network namespace pointer is set during mount

[Devel] [PATCH 6/6] NFS: idmap PipeFS notifier introduced

2011-11-28 Thread Stanislav Kinsbursky
This patch subscribes NFS clients to RPC pipefs notifications. Idmap notifier is registering on NFS module load. This notifier callback is responsible for creation/destruction of PipeFS idmap pipe dentry for NFS4 clients. Since ipdmap pipe is created in rpc client pipefs directory, we have make su

[Devel] [PATCH 5/6] NFS: handle NFS idmap pipe PipeFS dentries by network namespace aware routines

2011-11-28 Thread Stanislav Kinsbursky
This patch makes NFS idmap pipes dentries allocated and destroyed in network namespace context by PipeFS network namespace aware routines. Network namespace context is obtained from nfs_client structure. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/idmap.c | 61 +

[Devel] [PATCH 3/6] NFS: pass NFS client owner network namespace to RPC client creation routine

2011-11-28 Thread Stanislav Kinsbursky
This patch replaces static "init_net" with nfs_client->net pointer in RPC client creation calls. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/client.c |2 +- fs/nfs/internal.h |1 + fs/nfs/mount_clnt.c |4 ++-- fs/nfs/super.c |1 + 4 files changed, 5 insertions(+),

[Devel] [PATCH 1/6] SUNRPC: fix pipe->ops cleanup on pipe dentry unlink

2011-11-28 Thread Stanislav Kinsbursky
This patch looks late due to GSS AUTH patches sent already. But it fixes a flaw in RPC PipeFS pipes handling. I've added this patch in the series, because this series related to pipes. But it should be a part of previous series named "SUNPRC: cleanup PipeFS for network-namespace-aware users". Pipe

[Devel] Re: [PATCH 7/7] event: add tracepoint for accounting block time

2011-11-28 Thread Arjan van de Ven
On 11/28/2011 3:42 AM, Peter Zijlstra wrote: > On Mon, 2011-11-28 at 12:03 +0300, Andrew Vagin wrote: >> This tracepoint shows how long a task is sleeping in uninterruptible state. >> >> E.g. >> It may show how long and where a mutex is waited. > > Fair enough, makes one wonder how much it would t

[Devel] Re: [PATCH 7/7] event: add tracepoint for accounting block time

2011-11-28 Thread Arjan van de Ven
> > perf_evlist is what you call perf_bundle and perf_evsel is what you call > perf_event in powertop. > > That part of the API should be ok for wider use and is in fact exported > in the python binding. I don't care about the snake language. frankly all that's missing is a "safe" accessor libr

[Devel] [PATCH v2 0/3] cpuacct cgroup refactoring

2011-11-28 Thread Glauber Costa
Hi, This is the same series I've already sent before. Just sending again after the conflict with the code that was in tip.git Best regards, Glauber Costa (3): Change cpustat fields to an array. Reuse cgroup's parent pointer cpuacct.stat: re-use scheduler statistics for the root cgroup ar

[Devel] [PATCH v2 1/3] Change cpustat fields to an array.

2011-11-28 Thread Glauber Costa
This patch changes fields in cpustat from a structure, to an u64 array. Math gets easier, and the code is more flexible. Signed-off-by: Glauber Costa Reviewed-by: KAMEZAWA Hiroyuki CC: Paul Tuner CC: Peter Zijlstra --- arch/s390/appldata/appldata_os.c | 16 +++--- arch/x86/include/asm

[Devel] [PATCH v2 2/3] Reuse cgroup's parent pointer

2011-11-28 Thread Glauber Costa
We already have a pointer to the cgroup parent (whose data is more likely to be in the cache than this, anyway), so there is no need to have this one in cpuacct. This patch makes the underlying cgroup be used instead. Signed-off-by: Glauber Costa Reviewed-by: KAMEZAWA Hiroyuki CC: Paul Tuner C

[Devel] [PATCH v2 3/3] cpuacct.stat: re-use scheduler statistics for the root cgroup

2011-11-28 Thread Glauber Costa
Right now, after we collect tick statistics for user and system and store them in a well known location, we keep the same statistics again for cpuacct. Since cpuacct is hierarchical, the numbers for the root cgroup should be absolutely equal to the system-wide numbers. So it would be better to jus

[Devel] Re: [PATCH v6 01/10] Basic kernel memory functionality for the Memory Controller

2011-11-28 Thread KAMEZAWA Hiroyuki
On Mon, 28 Nov 2011 09:03:09 -0200 Glauber Costa wrote: > On 11/28/2011 12:24 AM, KAMEZAWA Hiroyuki wrote: > > On Fri, 25 Nov 2011 15:38:07 -0200 > > Glauber Costa wrote: > > > >> This patch lays down the foundation for the kernel memory component > >> of the Memory Controller. > >> > >> As of t