Re: [patch 1/3] basic accounting over taskstats

From: Andrew Morton
Date: Thu Aug 03 2006 - 02:51:03 EST


On Wed, 02 Aug 2006 21:20:53 -0700
Jay Lan <jlan@xxxxxxxxxxxx> wrote:

> This patch is to replace the "[patch 1/3] add basic accounting
> fields to taskstats" posted on 7/31.
>
> This patch adds some basic accounting fields to the taskstats
> struct, add a new kernel/tsacct.c to handle basic accounting
> data handling upon exit. A handle is added to taskstats.c
> to invoke the basic accounting data handling.
>

> +#define TS_COMM_LEN 16 /* should sync up with TASK_COMM_LEN
> + * in linux/sched.h */

There was a proposal recently to increase TASK_COMM_LENGTH from 16 to 20 so
that it was long enough to hold an entire IEEE(?) UUID so that the
operator can easily match up a kernel thread with the storage device which
it manages.

I don't know if/when that change will happen, but the message is that
TASK_COMM_LENGTH may increase.

> + BUILD_BUG_ON(TS_COMM_LEN < TASK_COMM_LEN);

And if it does, we'll need to increase TS_COMM_LEN as well. That will
amount to an non-compatible change to the interface which you are
proposing. We want to avoid that.

Hence I'd propose that you increase TS_COMM_LEN to 32 or something and if
TASK_COMM_LEN later becomes really big, we might just choose to truncate
it.

Or we remove this field altogether, perhaps. The same info is available
from /proc/pid/stat anyway. Is it really needed?

-
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/