Welcome! Log In Create A New Profile

Advanced

[PATCH 0/7] Post merge per-bdi writeback patches v2

Posted by Jens Axboe 
On Tue, Sep 15, 2009 at 03:04:19PM +0200, Jens Axboe wrote:
>
> > Let's have a look at the flags in wbc:
> > nonblocking - Currently only set by direct callers of ->writepage() BUT
> > originally wb_kupdate() and background_writeout() also
> > set this flag. Since filesystems and write_cache_pages()
> > use the flag we should set it for equivalent writeouts as
> > well. This should be fixed...
>
> Since this is all handled by the dedicated thread now, dropping the
> nonblocking bit was on purpose. What would the point be, except for
> stopping pdflush being blocked on request allocation?

Note that this flag just caused utter mess traditionally. btrfs decided
to ignore it completely and ext4 partially. Removing this check in
XFS increases large bufferd write loads massively.

Just half-removing it is a bad idea, though - if you don't set it
anymore please kill it entirely.

--
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/
Trond Myklebust
Re: [PATCH 2/7] Assign bdi in super_block
September 15, 2009 03:20PM
On Tue, 2009-09-15 at 12:14 +0200, Jan Kara wrote:
> On Mon 14-09-09 20:36:54, Jens Axboe wrote:
> > No, that should work fine. NFS already works fine with the bdi flusher
> > threads, so you should just point it at that bdi.
> But will it really work well? I mean if we sync the superblock on the
> client, it will sync only the private BDI. So it won't sync any directory
> inodes because they are on the default_backing_dev_info (NFS leaves
> sb->s_bdev at NULL).

All directory related operations (link, rename, create, ...) are fully
synchronous in NFS. There should be no need to set up anything to
synchronise directory inodes.

Cheers
Trond

--
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/
On Tue, Sep 15 2009, Christoph Hellwig wrote:
> On Tue, Sep 15, 2009 at 03:04:19PM +0200, Jens Axboe wrote:
> >
> > > Let's have a look at the flags in wbc:
> > > nonblocking - Currently only set by direct callers of ->writepage() BUT
> > > originally wb_kupdate() and background_writeout() also
> > > set this flag. Since filesystems and write_cache_pages()
> > > use the flag we should set it for equivalent writeouts as
> > > well. This should be fixed...
> >
> > Since this is all handled by the dedicated thread now, dropping the
> > nonblocking bit was on purpose. What would the point be, except for
> > stopping pdflush being blocked on request allocation?
>
> Note that this flag just caused utter mess traditionally. btrfs decided
> to ignore it completely and ext4 partially. Removing this check in
> XFS increases large bufferd write loads massively.
>
> Just half-removing it is a bad idea, though - if you don't set it
> anymore please kill it entirely.

I haven't touched it, except removing it from the caller where it
doesn't make sense anymore. If you think we should kill it completely,
then lets look at that in a few days. I've got more than enough stuff
queued up for inclusion now that I need to test and verify before doing
even more cleanups/changes :-)

--
Jens Axboe

--
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/
On Tue 15-09-09 09:08:29, Christoph Hellwig wrote:
> On Tue, Sep 15, 2009 at 03:04:19PM +0200, Jens Axboe wrote:
> >
> > > Let's have a look at the flags in wbc:
> > > nonblocking - Currently only set by direct callers of ->writepage() BUT
> > > originally wb_kupdate() and background_writeout() also
> > > set this flag. Since filesystems and write_cache_pages()
> > > use the flag we should set it for equivalent writeouts as
> > > well. This should be fixed...
> >
> > Since this is all handled by the dedicated thread now, dropping the
> > nonblocking bit was on purpose. What would the point be, except for
> > stopping pdflush being blocked on request allocation?
>
> Note that this flag just caused utter mess traditionally. btrfs decided
> to ignore it completely and ext4 partially. Removing this check in
> XFS increases large bufferd write loads massively.
>
> Just half-removing it is a bad idea, though - if you don't set it
> anymore please kill it entirely.
The nonblocking flag is still set for writeback done for memory reclaim.
OTOH the only real consumer of this flag now seems to be
__block_write_full_page() which does trylock_buffer() in case of
nonblocking writeback. I'm undecided whether it makes sence or not.

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR
--
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/
On Tue, Sep 15, 2009 at 04:01:45PM +0200, Jan Kara wrote:
> On Tue 15-09-09 09:08:29, Christoph Hellwig wrote:
> > On Tue, Sep 15, 2009 at 03:04:19PM +0200, Jens Axboe wrote:
> > >
> > > > Let's have a look at the flags in wbc:
> > > > nonblocking - Currently only set by direct callers of ->writepage() BUT
> > > > originally wb_kupdate() and background_writeout() also
> > > > set this flag. Since filesystems and write_cache_pages()
> > > > use the flag we should set it for equivalent writeouts as
> > > > well. This should be fixed...
> > >
> > > Since this is all handled by the dedicated thread now, dropping the
> > > nonblocking bit was on purpose. What would the point be, except for
> > > stopping pdflush being blocked on request allocation?
> >
> > Note that this flag just caused utter mess traditionally. btrfs decided
> > to ignore it completely and ext4 partially. Removing this check in
> > XFS increases large bufferd write loads massively.
> >
> > Just half-removing it is a bad idea, though - if you don't set it
> > anymore please kill it entirely.
> The nonblocking flag is still set for writeback done for memory reclaim.
> OTOH the only real consumer of this flag now seems to be
> __block_write_full_page() which does trylock_buffer() in case of
> nonblocking writeback. I'm undecided whether it makes sence or not.

Ugh, making sense is tricky to say. If __block_write_full_page
does a lock_buffer() instead of a trylock_buffer(), and ext3 is mounted in
data=ordered mode then it is very possible that we'll end up with a
dirty page with locked buffers.

The buffers will have been locked by ext3 data=ordered writeback and
they won't unlock until the IO is done.

We probably don't want kswapd waiting on that writeback.

-chris



--
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/
Sorry, only registered users may post in this forum.

Click here to login