mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* initramfs fails for medium sized cpio archives
@ 2003-03-19  1:11 Trammell Hudson
  2003-03-19  1:07 ` Greg KH
  2003-03-19  2:03 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Trammell Hudson @ 2003-03-19  1:11 UTC (permalink / raw)
  To: linux-kernel

[ Please cc me on any replies.  Thanks! ]

I'm trying to get 2.5.64 to load my initramfs cpio archive and
have run into a problem with memory allocation during the
unpacking.

It seems that page_writeback_init() does not get called before
populate_root(), so total_pages in mm/page-writeback.c is still
zero rather than being initialized to nr_free_pagecache_pages().

The symptom is that after about 300 kb of files, balance_dirty_pages()
is called.  This then calls get_dirty_limits() that computes

	unmapped_ratio = 100 - (ps->nr_mapped * 100) / total_pages;

I've added a sanity check in get_dirty_limits() that initialized
total_pages if it is still zero and things seem to work, but
should some of the memory management modules be initialized first?

The kernel is booting on an Athlon and compiled with gcc 3.2.2.
The cpio archive is uClibc based and is about 600 k in size.
I created it with the following command:

	find . \
		| cpio -H crc -ov \
		| gzip
		> ../linux-2.5.64/usr/initramfs_data.cpio.gz

Trammell
-- 
  -----|----- hudson@osresearch.net                   W 240-283-1700
*>=====[]L\   hudson@rotomotion.com                   M 505-463-1896
'     -'-`-   http://www.swcp.com/~hudson/                    KC5RNF


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

end of thread, other threads:[~2003-03-20  2:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-19  1:11 initramfs fails for medium sized cpio archives Trammell Hudson
2003-03-19  1:07 ` Greg KH
2003-03-19  2:03 ` Andrew Morton
2003-03-20  2:12   ` Trammell Hudson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®