lkml.org 
[lkml]   [2003]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectinitramfs fails for medium sized cpio archives
[ 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

-
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://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.036 / U:2.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site