Re: [PATCH 2/7] NOMMU: Provide per-task stack usage through /proc for NOMMU

From: Mike Frysinger
Date: Mon Dec 14 2009 - 18:33:32 EST


On Thu, Dec 10, 2009 at 08:58, David Howells wrote:
> Make it possible to get the per-task stack usage through /proc on a NOMMU
> system. ÂThe MMU-mode routine can't be used because walk_page_range() doesn't
> work on NOMMU.
>
> It can be tested to show the stack usages of non-kernel-thread processes:
>
> Â Â Â Â# grep "Stack usage:" /proc/*/status | grep -v "0 kB"
> Â Â Â Â/proc/1/status:Stack usage: Â Â 2 kB
> Â Â Â Â/proc/57/status:Stack usage: Â Â3 kB
> Â Â Â Â/proc/58/status:Stack usage: Â Â1 kB
> Â Â Â Â/proc/59/status:Stack usage: Â Â3 kB
> Â Â Â Â/proc/60/status:Stack usage: Â Â5 kB
> Â Â Â Â/proc/self/status:Stack usage: Â1 kB
>
> I've only tested it with ELF-FDPIC, though it should work with FLAT too.

both seem to work for me. a simple FLAT shows 1kB while one with a
2kB buffer shows 3kB.

Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
-mike
--
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/