Messages in this thread | | | Date | Wed, 28 Jun 2006 20:33:21 +0200 | From | Jan Kara <> | Subject | Re: Question about buffer.c |
| |
Hello,
please try to post mails with lines shorter than 75 characters. It easier to read them... Now to your problem:
> 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.
> 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? 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 - 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/
| |