mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Question about buffer.c
@ 2006-06-28  9:28 Marcin Glogowski
  2006-06-28 18:33 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Glogowski @ 2006-06-28  9:28 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about buffer.c
  2006-06-28  9:28 Question about buffer.c Marcin Glogowski
@ 2006-06-28 18:33 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2006-06-28 18:33 UTC (permalink / raw)
  To: Marcin Glogowski; +Cc: linux-kernel

  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-28 18:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28  9:28 Question about buffer.c Marcin Glogowski
2006-06-28 18:33 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®