Re: [Patch][RFC] Disabling per-tgid stats on task exit in taskstats

From: Jay Lan
Date: Wed Jun 21 2006 - 19:34:13 EST



>>> System: SGI a350, a two cpus IA64 machine.
>>> Kernel: 2.6.17-rc3 + delay-acct-taskstats patch set
>>> + tgid-disable_patch_shailabh + exit race patch_balbir +
>>> csa_patch_jlan
>>>
>>> I also modified the Decumentation/accounting/getdelay.c:
>>> - it repeatedly does recv() to retrieve data from kernel
>>> - instead of using printf() to display data received, i simply write
>>> it to
>>> disk as it would be for an accounting daemon. Note that currently
>>> both the
>>> BSD (or GNU) accounting and the CSA writes accounting data from
>>> kernel.
>>> As an effort of moving accounting system to userspace, the raw data
>>> needs
>>> to be written to a raw file first before further processing.
>>>
> In exit_recv.c, you appear to be dumping the per-tgid data received
> to disk too ?
> If the accounting daemon isn't interested in per-tgid, shouldn't it be
> discarding the data immediately after
> doing the recv() and only write to disk the data it wants ?
> Perhaps I'm missing something.
>
I modified my exit_recv.c so that
1) i can totally skip data marked TASKSTATS_TYPE_AGGR_TGID
2) i can optinally drop data after receipt without writing to disk

The first case produced a system time of 1.34 second and the second
case produced a system time of 1.25 sec. Big improvement over 1.74
sec, but still too high compared to 0.34 sec when we disable tgid
completely.

Shailabh and me now eye on the lock patch that fixed an exit race
crash i reported. The global lock was held too long in scanning threads.
Shailabh is working on a new patch.

- jay

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/