Re: /proc/*/statm, exactly what does "shared" mean?

From: Hugh Dickins
Date: Wed Feb 16 2005 - 11:18:36 EST


On Wed, 16 Feb 2005, Richard F. Rebel wrote:
>
> I have heard that this particular information, while very important to
> userland developers like me, is probably too expensive to keep track of
> for most users.
>
> Perhaps a way to enable it for developers, whom are willing to spend the
> cpu cycles, and disable it for regular use would be a solution.
>
> Would it be possible develop a solution allowing us to enable/disable
> this tracking via a sysctl call?

Possible, but I don't think a sysctl would make much sense here.

The most important thing is that any heavyweight information gathering
should not be happening by default, as a side-effect of something
frequently run.

So a lot of people would oppose putting back any such heavyweight
work into any of the /proc/<pid>/statm fields. But if it goes into
a separate /proc/<pid>/whatever, not read by current tools, then
it's much less of a problem.

I'm still resistant, because I think if the information you're
interested in (how many private pages shared across forks) really
were of interest to many people, then someone would soon write a
top-like tool which kept sampling these values, and we'd be back to
the original situation. Or if it's not of interest to many people,
then isn't it better off as an out-of-tree patch?

But I don't have a dogmatic position on it,
and trust others' judgement better than my own.

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