Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Disk cache

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

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Supposedly a viable task :) .

    What problems are you facing ?

    -Michael