Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Disk cache

Altera_Forum
Honored Contributor II
1,409 Views

Hi 

 

 

 

I have a DE2 based hardware platform running uClinux (uClinux_dist_20070130.tar.bz2). 

 

 

This platform reads special disks with VFAT partitions and exports it via NFS. To do this, it was necessary to develop a block type device driver and port nfs-utils to uClinux. 

 

 

The equipment is working. In other words, from a Linux PC it’s possible to mount an NFS share that is present on uClinux. 

 

 

However, sometimes the OOM-Killer is invoked, especially when I’m operating the uClinux console (a simple “ls” command, for example) and some larger file is being copied via NFS. Apparently the uClinux allocates too much memory (disk sectors cache) and no memory is left to the rest (operating system and applications). 

 

 

The amount of RAM is 16 MBytes. During copy operations, only 600 to 800 Kbytes are left free. 

 

 

I have tried to control the way that uClinux manages the cache, changing file contents in /proc/sys/vm, but I have had no success. 

 

 

So I have a few questions: 

 

 

- Is it possible to disable disk sectors' read cache in uClinux? 

- If not, is it possible to restrict in an effective way the amount of memory used by the cache? 

- Has anyone faced a similar problem? 

 

Thanks
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
652 Views

Are you using the no-MMU flavor of Linux ? Same is known to have problems with "unusual" memory allocation tasks. Maybe you should switch to the MMU enabled version. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
652 Views

Thanks Michael 

 

I'm trying to migrate to Linux with MMU. However, I'm having trouble porting disk device driver to the latest version of the kernel. 

 

Tiago
0 Kudos
Altera_Forum
Honored Contributor II
652 Views

Supposedly a viable task :) . 

 

What problems are you facing ?  

 

-Michael
0 Kudos
Reply