Re: [PATCH] fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t

From: Jan Kara
Date: Mon Nov 18 2019 - 06:58:37 EST


On Fri 15-11-19 12:36:34, Theodore Y. Ts'o wrote:
> On Fri, Nov 15, 2019 at 03:56:38PM +0100, Jan Kara wrote:
> > With some effort, we could even shrink struct buffer_head from 104 bytes
> > (on x86_64) to 96 bytes but I don't think that effort is worth it (I'd find
> > it better use of time to actually work on getting rid of buffer heads
> > completely).
>
> Is that really realistic? All aside from the very large number of
> file systems which use buffer_heads that would have to be reworked,
> the concept of buffer heads is pretty fundamental to how jbd2 is
> architected.

I think it is reasonably possible to remove buffer_heads from data path
(including direct IO path) of all filesystems. That way memory consumption
of buffer_heads becomes mostly irrelevant and we can have a look how much
from the current bh framework still makes sense...

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR