All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Jan Kara <jack@suse.cz>
Cc: ext4 development <linux-ext4@vger.kernel.org>, Jan Kara <jack@suse.cz>
Subject: Re: per inode fsync optimization question
Date: Wed, 03 Apr 2013 19:09:33 +0400	[thread overview]
Message-ID: <87zjxfps5u.fsf@openvz.org> (raw)
In-Reply-To: <20130403145055.GD14667@quack.suse.cz>

On Wed, 3 Apr 2013 16:50:55 +0200, Jan Kara <jack@suse.cz> wrote:
> On Wed 03-04-13 18:21:46, Dmitry Monakhov wrote:
> > inode store i_sync_tid and i_datasync_tid  in order to optimize journal
> > flushes and wait for commits only when necessary, but
> > fields are declared as tid_t(not atomic_t as it done in ext3) so we
> > have not synchronization between readers and writers, so gcc and cpu
> > is allowed to perform prefetch, cache and other stuff.
> > Looks like a bug, right?
>   Reads and writes to atomic_t aren't guaranteed to be any kind of a
> barrier (if fact they are compiled as simple stores and loads on x86). Only
> arithmetic operations on atomic types are special. So using tid_t is just
> fine.
Ok but what about prefetching?
Compiler is allowed to prefetch on early stage ?
should we use ACCESS_ONCE() or wmb() and rmb() here?


> 
> 								Honza
> -- 
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR

  reply	other threads:[~2013-04-03 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 14:21 per inode fsync optimization question Dmitry Monakhov
2013-04-03 14:50 ` Jan Kara
2013-04-03 15:09   ` Dmitry Monakhov [this message]
2013-04-03 15:15     ` Jan Kara
2013-04-03 15:41       ` Dmitry Monakhov
2013-04-03 16:03         ` Jan Kara

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=87zjxfps5u.fsf@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.