Re: howto see shmem

Mike Fedyk (mfedyk@matchmail.com)
Wed, 24 Oct 2001 16:48:37 -0700


On Wed, Oct 24, 2001 at 07:37:26PM -0400, Robert Love wrote:
> On Wed, 2001-10-24 at 19:27, Mart?n Marqu?s wrote:
> > [...]
> > ------ Shared Memory Segments --------
> > key shmid owner perms bytes nattch status
> > 0x00000000 65536 nobody 600 46084 11 dest
> > [...]
> > I can see 46084 bytes in shared memory used by the apache.
> > Am I wrong?
>
> Nope. Applications know how much the are sharing because they can
> easily see what region of memory is shared/mapped into their's.
>
> The reason the kernel can't figure out the net shared memory is because
> there is no simple way -- it has to add up the shared regions of all
> applications, counting each shared segment only once. Too much work.
>

Actually, if it's done in the COW code, you could quite possibly get most of
it right there...

Does anyone know of something that can make use of the shmem accting?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/