Re: [RFC] changes to buffer.c (was Test12 ll_rw_block error)

Marcelo Tosatti
2000-12-27T01:43:21Z

On Tue, 26 Dec 2000, Chris Mason wrote:

>
> Hi guys,
>
> Here's my latest code, which uses ll_rw_block for anon pages (or
> pages without a writepage func) when flush_dirty_buffers,
> sync_buffers, or fsync_inode_buffers are flushing things. This
> seems to have fixed my slowdown on 1k buffer sizes, but I
> haven't done extensive benchmarks yet.

Great.

I'll run some benchmarks around here too and let you know.

> Other changes: After freeing a page with buffers, page_launder
> now stops if (!free_shortage()). This is a mod of the check where
> page_launder checked free_shortage after freeing a buffer cache
> page. Code outside buffer.c can't detect buffer cache pages with
> this patch, so the old check doesn't apply.
>
> My change doesn't seem quite right though, if page_launder wants
> to stop when there isn't a shortage, it should do that regardless of
> if the page it just freed had buffers. It looks like this was added
> so bdflush could call page_launder, and get an early out after
> freeing some buffer heads, but I'm not sure.
>
> In test13-pre4, invalidate_buffers skips buffers on a page
> with a mapping. I changed that to skip mappings other than the
> anon space mapping.
>
> Comments and/or suggestions on how to make better use of this stuff
> are more than welcome ;-)

Well, the best use of this patch seems to be the ability to do write
clustering in the ->writepage() operation for normal filesystems.

I'll try to do a lightweight write clustering patch for
block_write_full_page soon.