Skip to contentSkip to conversation

weird memshared value

DISCUSSION Roberto Orenstein 2 participants 5 messages Oct 3, 2001 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Cristoph,

Guess found a bug in the MemShared value that shows up in /proc/meminfo. At least it's pretty weird :)

After a cp kernel_tree new_tree, together with make bzImage, got the following number:

MemShared: 4294966488 kB

My system has only 128MB. P-III, kernel 2.4.9-ac16. It doesn't harm, but it's way far from my system mem.

Any idea?

thanx

Roberto

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

#1 lore raw
Quoted 5 lines · Roberto Orenstein

Hi Cristoph,

Guess found a bug in the MemShared value that shows up in /proc/meminfo. At least it's pretty weird :)

Quoted 8 lines

After a cp kernel_tree new_tree, together with make bzImage, got the following number:

MemShared: 4294966488 kB

My system has only 128MB. P-III, kernel 2.4.9-ac16. It doesn't harm, but it's way far from my system mem.

I've just come across this myself. There is a patch on lkml, look for the thread ~"4gb memshared, cached bigger than memtotal"...

Mike
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

#2 lore raw
In reply to Roberto Orenstein
Quoted 8 lines · Roberto Orenstein

Hi Cristoph,

Guess found a bug in the MemShared value that shows up in /proc/meminfo. At least it's pretty weird :)

After a cp kernel_tree new_tree, together with make bzImage, got the following number:

Quoted 7 lines

MemShared: 4294966488 kB

My system has only 128MB. P-III, kernel 2.4.9-ac16. It doesn't harm, but it's way far from my system mem.

Any idea?

Here you go:

Date: Mon, 1 Oct 2001 22:17:26 +0100 (BST)
From: Hugh Dickins <[email protected]>
X-Sender: [email protected]
To: Christoph Rohland <[email protected]>
cc: Mike Fedyk <[email protected]>, Alan Cox <[email protected]>,
[email protected]
Subject: [PATCH] Re: 4GB MemShared, Cached bigger (and growing) than MemTotal
(64MB) on 2.4.9-ac18
In-Reply-To: <[email protected]>
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Status: RO
Content-Length: 778
Lines: 25

Quoted 7 lines · Christoph Rohland
Quoted 3 lines · Mike Fedyk

After this happened, I saw MemShared go up to about 4GB, and Cached started growing, getting even bigger than ram!

Apparently the shmem accounting is screwed. (Hugh does something ring at your side?)

I've now looked, and it's obviously my error in -ac shmem_writepage:
patch below against 2.4.10-ac2, would apply equally to 2.4.9-ac16 on.

Hugh

mm/shmem.c +1 -0
@@ -462,6 +462,7 @@
 		swap_list_unlock();
 		/* Add it back to the page cache */
 		add_to_page_cache_locked(page, mapping, index);
+		atomic_inc(&shmem_nrpages);
 		activate_page(page);
 		SetPageDirty(page);
 		error = -ENOMEM;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 9 lines · Roberto Orenstein

Hi Mike

Thanx for the help. Patch applied and problem vanish :)

regards

Roberto

Be sure to post that to the list. We need success reports for these types of things.

I have yet to test the patch myself.

I was able to reliably reproduce it by setting my ram down to 64mb with no swap and running mozilla with kde...

Mike
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

now I remebered to post to the list. guess I need to take a rest :(

Quoted 7 lines · Mike Fedyk
Quoted 5 lines · Roberto Orenstein

Hi Mike

Thanx for the help. Patch applied and problem vanish :)

Quoted 8 lines
Quoted 4 lines

regards

Roberto

Be sure to post that to the list. We need success reports for these types of things.

Ok. I just thought it was a well know thing that I missed :)

Quoted 4 lines

I have yet to test the patch myself.

I was able to reliably reproduce it by setting my ram down to 64mb with no swap and running mozilla with kde...

I run that test and it didn't trigger.
I also did the same thing that trigger it here: cp kernel_source new_source and a make bzImage in another term. Everythig is normal. Just fine.

Roberto

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/