linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Re: Lazytime feature bugs
Date: Thu, 26 Feb 2015 08:45:53 -0500	[thread overview]
Message-ID: <20150226134553.GF11217@thunk.org> (raw)
In-Reply-To: <20150226083455.GA10894@quack.suse.cz>

On Thu, Feb 26, 2015 at 09:34:55AM +0100, Jan Kara wrote:
>   I don't think you can reset i_dirty_time_when to "now" in b) because in
> that case continually dirtied files won't ever have timestamps written (you
> are completely loosing track of when you last wrote timestamps to disk).

In the case of continually dirtied files, in my proposal we would be
checking to see if i_dirty_time_when is older when we scan files in
b_io, which means that we would discover files with stale timestamps
on disk, and they would get written out.  This was the same as (4) in
your propsal:


> 4) When processing inodes on b_io list we also check whether
>    i_dirty_time_when is older than 12 hours. If so, we writeout inode.

But your mechanism would work as well; I preferred to keep
i_dirty_when to only mean when the pages were dirtied, but the
important thing is that we have to track when the timestamps were
dirtied and when the pages were dirtied as separate things.

> BTW, I prefer to really keep the timestamp updates within 24 hours. IMHO
> it's easier for humans and it's not like there's any performance difference
> in possibly writing inodes every 12 hours instead of every 24 hours.

I agree, writing inodes ever 12 hours so that the worst case staleness
is 24 hours is fair enough.  If we really cared we could make the
duration tunable, but I agree that whether we use 12 or 24 hours, with
the worst case being 24 or 48 hours, is probably not going to result
in a measurable performance difference.

Cheers,

					- Ted

  reply	other threads:[~2015-02-26 13:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 13:19 Lazytime feature bugs Jan Kara
2015-02-24 18:31 ` Jan Kara
2015-02-24 18:58   ` Linus Torvalds
2015-02-25 14:52     ` Theodore Ts'o
2015-02-25 16:25       ` Jan Kara
2015-02-26  4:33         ` Theodore Ts'o
2015-02-26  8:34           ` Jan Kara
2015-02-26 13:45             ` Theodore Ts'o [this message]
2015-02-26 14:38               ` Jan Kara
2015-02-26 19:27                 ` Theodore Ts'o
2015-03-02  8:29                   ` Jan Kara
2015-03-07  5:34                     ` [PATCH] fs: make sure the timestamps for lazytime inodes eventually get written Theodore Ts'o
2015-03-08 10:06                       ` Jan Kara
2015-03-08 19:06                         ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150226134553.GF11217@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).