lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090325004609.GF32307@mit.edu>
Date:	Tue, 24 Mar 2009 20:46:09 -0400
From:	Theodore Tso <tytso@....edu>
To:	Don Porter <porterde@...utexas.edu>
Cc:	Eric Sandeen <sandeen@...hat.com>, linux-ext4@...r.kernel.org
Subject: Re: ext3 leaking buffer_heads

On Tue, Mar 24, 2009 at 05:43:10PM -0500, Don Porter wrote:
> Thanks for the tip, Eric.
>
> I spent some time tracing through this in a debugger.
>
> I believe the lingering buffer_heads are allocated by  
> journal_write_commit_record()->journal_get_descriptor_buffer()->__getblk(). 
>  The reference count ends up at zero, but the buffer head is never freed.
>
> As best I can tell, this is correct as long as the associated page is  
> cached, so that the associated buffer_head can be looked up and reused  
> later.
>
> I plan to look into this more, but perhaps the issue is just that the  
> kernel should be more aggressive about freeing cached journal pages?   
> They are highly unlikely to be used again once a committed transaction  
> is completely out on disk, as the journal is roughly an append-only log,  
> right?

The journal is a fixed sized, circular log, so the buffer_head will be
reused eventually.  In the case of memory pressure the unreferenced
buffer_head will be freed, but since we never reference the contents
of the journal, we could be more aggressive about freeing the
buffer_head just to avoid pushing out more valuable memory contents
when we start getting put under memory pressure.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ