All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Holst <mail@s-holst.de>
To: sparclinux@vger.kernel.org
Subject: srmmu_nocache_calcsize with low memory
Date: Sun, 21 Mar 2004 15:50:52 +0000	[thread overview]
Message-ID: <20040321155052.GA10374@spike> (raw)

hello,

there is a problem in 2.6.4/5 according the amount of system ram
reserved on machines with very low memory (e.g. leon systems ;)).

in void srmmu_nocache_calcsize(void) there is a hardcoded minimum size
for srmmu_nocache_npages of currently 550:

	srmmu_nocache_npages 		sysmemavail / SRMMU_NOCACHE_ALCRATIO / 1024 * 256;

 /* P3 XXX The 4x overuse: corroborated by /proc/meminfo. */
	// if (srmmu_nocache_npages < 256) srmmu_nocache_npages = 256;
	if (srmmu_nocache_npages < SRMMU_MIN_NOCACHE_PAGES)
		srmmu_nocache_npages = SRMMU_MIN_NOCACHE_PAGES;


i didn't really understand the comment - what is the matter with that?

after deactivating this minimum enforcement, my 4mb-system doesn't work
either; the calculated value (16) seems to be much too low. i did some
testing and found, that the system starts fine from a value around 27:

srmmu_nocache_npages = 27:

/ # cat proc/meminfo 
MemTotal:         2648 kB
MemFree:          1344 kB
Buffers:           396 kB
Cached:            380 kB
SwapCached:          0 kB
Active:            756 kB
Inactive:          148 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:         2648 kB
LowFree:          1344 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:            388 kB
Slab:              432 kB
Committed_AS:      252 kB
PageTables:         24 kB
VmallocTotal:    25600 kB
VmallocUsed:         0 kB
VmallocChunk:    25600 kB

with a value of 350, the system begins to run out of memory while
loading busybox (it gets very slow):

srmmu_nocache_npages = 350:

/ # cat proc/meminfo 
MemTotal:         1356 kB
MemFree:           344 kB
Buffers:           396 kB
Cached:             84 kB
SwapCached:          0 kB
Active:            516 kB
Inactive:          128 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:         1356 kB
LowFree:           344 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:            196 kB
Slab:              432 kB
Committed_AS:      252 kB
PageTables:         24 kB
VmallocTotal:    25600 kB
VmallocUsed:         0 kB
VmallocChunk:    25600 kB

srmmu_nocache_calcsize should be fixed for low memory. but how? any
suggestions?

-- 
RY  Stefan
+-----------------+----------------+
| mail@s-holst.de | www.s-holst.de |
+-----------------+----------------+

             reply	other threads:[~2004-03-21 15:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-21 15:50 Stefan Holst [this message]
2004-03-21 17:53 ` srmmu_nocache_calcsize with low memory Keith M Wesolowski
2004-03-21 18:44 ` Stefan Holst
2004-03-22  0:35 ` Keith M Wesolowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040321155052.GA10374@spike \
    --to=mail@s-holst.de \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.