Question about buffer.c
Hi,
I have big problem with my filesystem based on squash (also ROM) compressed filesystem.
My problem is when I'm copying something from mounted loop device the buffer cache memory is growing up - I want to disable block caching because Linux is killing processess because of the buffered inodes. Please tell me how to remove free list or touched buffer heads, or how to set the minimum cache size.
I tried to delete the bh with the brelse(bh); function but the /proc/memory shows that the buffer head wasn't released.
Is there an alternative for the getblk or ll_rw_block functions that don't use cache memory?
Best regards,
Marcin Glogowski
----------------------------------------------------------------------
PS. Fajny portal... >>> http://link.interia.pl/f196a
Hello,
please try to post mails with lines shorter than 75 characters. It
easier to read them... Now to your problem:
Quoted 5 lines
I have big problem with my filesystem based on squash (also ROM) compressed filesystem. My problem is when I'm copying something from mounted loop device the buffer cache memory is growing up - I want to disable block caching because Linux is killing processess because of the buffered inodes.
This is stange. Linux frees the buffers automatically under memory
pressure (and you seem to really get under pressure when kernel starts killing processes) unless they are pinned in memory - e.g. someone holds a reference to them.
Quoted 5 lines
Please tell me how to remove free list or touched buffer heads, or how to set the minimum cache size. I tried to delete the bh with the brelse(bh); function but the
/proc/memoryshows that the buffer head wasn't released. Is there an alternative for the getblk orll_rw_blockfunctions that don't use cache memory?
You have to always have a buffer on which ll_rw_block/getblk works.
However nothing prevents you from creating your private buffer head and freeing it when you are done with everything. But you really should not need it. There is a bug somewhere else which prevents kernel from really freeing those buffers.
Note that buffers are used just to make access to data in pagecache
easier (and doing IO with them) - each buffer is bound to some page in pagecache (either a device cache or mapping of data of an inode). So maybe you are doing something bad so that those pages cannot be freed...
Honza