[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20061031143056.GA3114@oleg>
Date: Tue, 31 Oct 2006 17:30:56 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Shailabh Nagar <nagar@...son.ibm.com>
Cc: Andrew Morton <akpm@...l.org>, Balbir Singh <balbir@...ibm.com>,
Jay Lan <jlan@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] taskstats: fix sub-threads accounting
On 10/30, Shailabh Nagar wrote:
>
> Oleg Nesterov wrote:
> >
> >Q: We don't send TASKSTATS_TYPE_AGGR_TGID when single-threaded process
> >exits. Is it good? How can the listener figure out that it was actually
> >a process exit, not sub-thread?
>
> We had a detailed discussion on this on lkml earlier. The overhead of
> sending essentially the same data twice (once as AGGR_TGID and once as
> PID) was deemed too heavy esp. as the taskstats structure size grew.
> Also, single threaded exit is a common case.
>
> Using process events, its possible for user space to distinguish single
> threaded process exits.
Ok, I see.
The taskstats's code is very clean and understandable, the only thing
I can't get is: why these listeners are per-cpu? It is very easy to add
'int exited_on_this_cpu' to struct taskstats.
Probaly this was done to filter out unneeded events (cpusets) ? In that
case it seems better to add cpumask_t to 'struct listener' but have a
single listener_array list.
Thanks!
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists