* sysinfo.sharedram not accounted for on i386 ?
@ 2001-02-12 7:05 Brian Grossman
2001-02-12 10:58 ` Erik Mouw
0 siblings, 1 reply; 5+ messages in thread
From: Brian Grossman @ 2001-02-12 7:05 UTC (permalink / raw)
To: linux-kernel
On i386, sysinfo.sharedram is not accounted for, leading /proc/meminfo to
always report MemShared as 0. Is this the intended behavior?
Brian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sysinfo.sharedram not accounted for on i386 ?
2001-02-12 7:05 sysinfo.sharedram not accounted for on i386 ? Brian Grossman
@ 2001-02-12 10:58 ` Erik Mouw
2001-02-12 12:53 ` Brian Grossman
0 siblings, 1 reply; 5+ messages in thread
From: Erik Mouw @ 2001-02-12 10:58 UTC (permalink / raw)
To: Brian Grossman; +Cc: linux-kernel
On Mon, Feb 12, 2001 at 12:05:03AM -0700, Brian Grossman wrote:
> On i386, sysinfo.sharedram is not accounted for, leading /proc/meminfo to
> always report MemShared as 0. Is this the intended behavior?
Yes.
Erik
--
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031, 2600 GA Delft, The Netherlands
Phone: +31-15-2783635 Fax: +31-15-2781843 Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sysinfo.sharedram not accounted for on i386 ?
2001-02-12 10:58 ` Erik Mouw
@ 2001-02-12 12:53 ` Brian Grossman
2001-02-12 12:46 ` Tigran Aivazian
0 siblings, 1 reply; 5+ messages in thread
From: Brian Grossman @ 2001-02-12 12:53 UTC (permalink / raw)
To: Erik Mouw; +Cc: linux-kernel
> On Mon, Feb 12, 2001 at 12:05:03AM -0700, Brian Grossman wrote:
> > On i386, sysinfo.sharedram is not accounted for, leading /proc/meminfo to
> > always report MemShared as 0. Is this the intended behavior?
>
> Yes.
Thanks. Is there a preferred way of getting the equivalent info
as free(1) did under 2.2?
I've written a script to derive it from /proc/[0-9]*/statm, but that seems
like an awkward approach. A related question: is the page size stored in
/proc somewhere?
Is there a discussion of this somewhere? I couldn't find one when I
searched the linux-kernel archives.
Brian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sysinfo.sharedram not accounted for on i386 ?
2001-02-12 12:53 ` Brian Grossman
@ 2001-02-12 12:46 ` Tigran Aivazian
2001-02-12 15:00 ` Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Tigran Aivazian @ 2001-02-12 12:46 UTC (permalink / raw)
To: Brian Grossman; +Cc: linux-kernel
On Mon, 12 Feb 2001, Brian Grossman wrote:
> > Yes.
>
> Thanks. Is there a preferred way of getting the equivalent info
> as free(1) did under 2.2?
btw, this is not only x86 behaviour but is also true on all other
architectures. I.e. Linux defines "shared memory" as a "integer constant
with value 0". So, to say "zero" is just a shorter form of saying "Linux
concept of shared memory". However, remember that if you are interested in
shared _pages_, that information is available and is not identically 0.
See the show_mem() function in arch/i386/mm/init.c.
>
> I've written a script to derive it from /proc/[0-9]*/statm, but that seems
> like an awkward approach. A related question: is the page size stored in
> /proc somewhere?
No, PAGE_SIZE is known at compile time and cannot ever change (especially
it cannot change ig you stay within i386 architecture). It is available to
programs by including <asm/page.h> header.
Tigran
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sysinfo.sharedram not accounted for on i386 ?
2001-02-12 12:46 ` Tigran Aivazian
@ 2001-02-12 15:00 ` Alan Cox
0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2001-02-12 15:00 UTC (permalink / raw)
To: Tigran Aivazian; +Cc: Brian Grossman, linux-kernel
> > like an awkward approach. A related question: is the page size stored in
> > /proc somewhere?
>
> No, PAGE_SIZE is known at compile time and cannot ever change (especially
> it cannot change ig you stay within i386 architecture). It is available to
> programs by including <asm/page.h> header.
Untrue. On many architectures page size is not fixed. You should use the
getpagesize() function/syscall. glibc knows if its a syscall or a constant
you dont
-
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://vger.kernel.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-02-12 15:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-12 7:05 sysinfo.sharedram not accounted for on i386 ? Brian Grossman
2001-02-12 10:58 ` Erik Mouw
2001-02-12 12:53 ` Brian Grossman
2001-02-12 12:46 ` Tigran Aivazian
2001-02-12 15:00 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox