Re: [PATCH] Fix mapping->writeback_index to point to the last written page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hello,

On Fri 25-02-11 16:55:19, Jun'ichi Nomura wrote:
> For range-cyclic writeback (e.g. kupdate), the writeback code sets
> a continuation point of the next writeback to mapping->writeback_index.
> 
> Current code sets the page next to the last written page.
> I think it's intended for sequential writer.
  Not exactly. The code is meant so that background writeback gets to
writing the end of a file which gets continuously dirtied (if we always
started at the beginning, nr_to_write could always get to 0 before we reach
end of the file).

> However, in many cases, sequential writer is writing in the middle of the page
> and it just redirties the last written page by continuing from that.
> 
> So the next writeback should try to continue from the last written page,
> not the next one.
> (If it's clean because the writer was on the page boundary,
>  pagevec_lookup_tag just skips it. So no problem.)
> 
> Otherwise, the last written page was left dirty until the writeback
> wraps around.
> 
> I.e. if the sequential dirtier has written on pagecache as '*'s below:
> 
>    |*******|*******|****---|-------|-------|     ( |---| is a page )
> 
> then, writeback happens:
> 
>    |-------|-------|-------|-------|-------|
> 
> and the dirtier continues:
> 
>    |-------|-------|----***|*******|*****--|
>                    A       B
> 
> Next writeback should start from page A, not B.
  Yes, this is downside of our current scheme. Have you actually observed
it in practice or is it mostly a theoretic concern?
 
But as I'm thinking about it, it wouldn't harm our original aim to do
what you propose and it can help this relatively common case. So I think
it's a good idea. Fengguang, what do you think?

								Honza
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux