linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.13-ac2/3/5: Strange cache memory report
@ 2001-11-01  8:23 Chris Tracy
  2001-11-01  8:26 ` Alexander Kellett
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Tracy @ 2001-11-01  8:23 UTC (permalink / raw)
  To: linux-kernel

Hey,

	I've noticed a strange bug in 2.4.13-ac2, 3, and 5.  (It wasn't
there in 2.4.12-ac2)  Namely, shortly after starting X, the reported
amount of cached memory spikes to somewhere around 18 hexabytes.
Needless to say, I don't have this much memory.  :-)

	The problem first occured on my pre-hardware-upgraded system, and
continues to occur on the post-upgrade system.  The first system was:

	ASUS A7V
	900MHz Athlon T-bird
	768MB RAM
	linux-2.4.13-ac2/ac3 (UP, CONFIG_HIGHMEM was off)

	The post-upgrade system is:

	Tyan Tiger MP S2460
	2x 1.4GHz Athlon MP 1600+
	1024MB RAM
	linux-2.4.13-ac5 (SMP, CONFIG_HIGHMEM was on)

	/proc/meminfo on the SMP system is:

        total:    used:    free:  shared: buffers:  cached:
Mem:  1053028352 812806144 240222208  8007680 385331200 18446744073599795200
Swap: 263168000        0 263168000
MemTotal:      1028348 kB
MemFree:        234592 kB
MemShared:        7820 kB
Buffers:        376300 kB
Cached:       4294860112 kB
SwapCached:          0 kB
Active:         453608 kB
Inact_dirty:    191808 kB
Inact_clean:         0 kB
Inact_target:   209700 kB
HighTotal:      131008 kB
HighFree:         2040 kB
LowTotal:       897340 kB
LowFree:        232556 kB
SwapTotal:      257000 kB
SwapFree:       257000 kB

	It doesn't seem to cause any problems, as the system continues to
function normally.  (Though I've not really tested to see if there's any
performance hit associated with the phenomenon)  Either way, I'm guessing
it's not what's supposed to be happening.  (As much as I'd love to have
that much cache)

	If you'd like any further information, please let me know.  Oh,
and please CC me as I'm not on this list.

	Thanks,

	Chris

--------------------------------
Chris Tracy
System/Network Administrator
Engineering Design Center
Santa Clara University
"Wherever you go, there you are."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.4.13-ac2/3/5: Strange cache memory report
  2001-11-01  8:23 2.4.13-ac2/3/5: Strange cache memory report Chris Tracy
@ 2001-11-01  8:26 ` Alexander Kellett
  2001-11-01 16:28   ` Josh McKinney
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kellett @ 2001-11-01  8:26 UTC (permalink / raw)
  To: Chris Tracy; +Cc: linux-kernel

On Thu, Nov 01, 2001 at 12:23:31AM -0800, Chris Tracy wrote:
> Hey,
> 
> 	I've noticed a strange bug in 2.4.13-ac2, 3, and 5.  (It wasn't
> there in 2.4.12-ac2)  Namely, shortly after starting X, the reported
> amount of cached memory spikes to somewhere around 18 hexabytes.
> Needless to say, I don't have this much memory.  :-)

Rik posted a patch yesterday to fix this.

mvg,
Alex

-- 
Eidetica                                           kelletta@eidetica.com
Kruislaan 400                               tel +31 20 888 4090 fax 4001
NL 1098 SM Amsterdam                            Home machine: myp.ath.cx
http://www.eidetica.com/                     Alexander Kellett (Lypanov)

vim: tw=70 cindent!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.4.13-ac2/3/5: Strange cache memory report
  2001-11-01  8:26 ` Alexander Kellett
@ 2001-11-01 16:28   ` Josh McKinney
  0 siblings, 0 replies; 3+ messages in thread
From: Josh McKinney @ 2001-11-01 16:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: Chris Tracy

On approximately Thu, Nov 01, 2001 at 09:26:39AM +0100, Alexander Kellett wrote:
> > Hey,
> > 
> > 	I've noticed a strange bug in 2.4.13-ac2, 3, and 5.  (It wasn't
> > there in 2.4.12-ac2)  Namely, shortly after starting X, the reported
> > amount of cached memory spikes to somewhere around 18 hexabytes.
> > Needless to say, I don't have this much memory.  :-)
> 
> Rik posted a patch yesterday to fix this.
> 

Here is the mentioned patch again.




--- linux-2.4.13-ac5/fs/proc/proc_misc.c.blkpg	Wed Oct 31 13:09:51 2001
+++ linux-2.4.13-ac5/fs/proc/proc_misc.c	Wed Oct 31 13:12:27 2001
@@ -140,7 +140,9 @@
 {
 	struct sysinfo i;
 	int len;
-	int pg_size;
+	unsigned int cached;
+
+	cached = atomic_read(&page_cache_size) - atomic_read(&shmem_nrpages);

 /*
  * display in kilobytes.
@@ -149,14 +151,12 @@
 #define B(x) ((unsigned long long)(x) << PAGE_SHIFT)
 	si_meminfo(&i);
 	si_swapinfo(&i);
-	pg_size = atomic_read(&page_cache_size) - i.bufferram ;
-
 	len = sprintf(page, "        total:    used:    free:  shared: buffers:  cached:\n"
 		"Mem:  %8Lu %8Lu %8Lu %8Lu %8Lu %8Lu\n"
 		"Swap: %8Lu %8Lu %8Lu\n",
 		B(i.totalram), B(i.totalram-i.freeram), B(i.freeram),
 		B(i.sharedram), B(i.bufferram),
-		B(pg_size), B(i.totalswap),
+		B(cached), B(i.totalswap),
 		B(i.totalswap-i.freeswap), B(i.freeswap));
 	/*
 	 * Tagged format, for easy grepping and expansion.
@@ -184,7 +184,7 @@
 		K(i.freeram),
 		K(i.sharedram),
 		K(i.bufferram),
-		K(pg_size - swapper_space.nrpages),
+		K(cached - swapper_space.nrpages),
 		K(swapper_space.nrpages),
 		K(nr_active_pages),
 		K(nr_inactive_dirty_pages),

-- 
Linux, the choice                | <doogie> Thinking is dangerous.  It leads
of a GNU generation       -o)    | to ideas.  -- Seen on #Debian 
Kernel 2.4.14-pre6         /\    | 
on a i586                 _\_v   | 
                                 | 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-11-01 16:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-01  8:23 2.4.13-ac2/3/5: Strange cache memory report Chris Tracy
2001-11-01  8:26 ` Alexander Kellett
2001-11-01 16:28   ` Josh McKinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).