All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir V. Saveliev" <vs@namesys.com>
To: "Lin Shen (lshen)" <lshen@cisco.com>
Cc: reiserfs-list@namesys.com
Subject: Re: Why reiser does a disk write on every sync() call?
Date: Tue, 27 Mar 2007 22:54:46 +0400	[thread overview]
Message-ID: <200703272254.46500.vs@namesys.com> (raw)
In-Reply-To: <08A9A3213527A6428774900A80DBD8D803BB80B4@xmb-sjc-222.amer.cisco.com>

Hello

On Tuesday 27 March 2007 21:20, Lin Shen (lshen) wrote:
> I saw 32 blocks by calling sync() alone.
> 

iostat used to count sectors which are 512 bytes long. Did you take that into account?

> Lin
> 
> > -----Original Message-----
> > From: Vladimir V. Saveliev [mailto:vs@namesys.com] 
> > Sent: Tuesday, March 27, 2007 1:00 AM
> > To: Lin Shen (lshen)
> > Cc: reiserfs-list@namesys.com
> > Subject: Re: Why reiser does a disk write on every sync() call?
> > 
> > Hello
> > 
> > On Monday 26 March 2007 22:12, Lin Shen (lshen) wrote:
> > > I'm using iostat to measure disk reads/writes associated 
> > with various 
> > > file operations under Reiser. One thing I noticed and can't 
> > explain is 
> > > that every sync() call by itself (not following a write or 
> > anything) 
> > > will cause an I/O write. Any ideas?
> > > 
> > 
> > The I/O write is performed by reiserfs implementation of 
> > sync_fs method of struct super_operations.
> > If filesystem is mounted r/w - reiserfs_sync_fs begins a 
> > transaction (or joins an existing one), journal super block 
> > if the transaction has zero length, closes the transaction 
> > and flushes old transactions including the one which was just 
> > closed. So, if there were no transaction to flush before 
> > sync() - one transaction of length 1 gets created, closed, 
> > committed and flushed. 5 blocks get written to disk in this 
> > case. My calculation can be wrong, though.
> > How much I/O do you notice? 
> > 
> > > Lin
> > > 
> > > 
> > 
> 
> 

  reply	other threads:[~2007-03-27 18:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1174932216.16988.ezmlm@namesys.com>
2007-03-26 18:12 ` Why reiser does a disk write on every sync() call? Lin Shen (lshen)
2007-03-27  7:59   ` Vladimir V. Saveliev
2007-03-27 17:20     ` Lin Shen (lshen)
2007-03-27 18:54       ` Vladimir V. Saveliev [this message]
2007-05-12 13:03         ` Grzegorz Jaśkiewicz
2007-05-12 14:56           ` Toby Thain
2007-05-16 15:32           ` Vladimir V. Saveliev

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=200703272254.46500.vs@namesys.com \
    --to=vs@namesys.com \
    --cc=lshen@cisco.com \
    --cc=reiserfs-list@namesys.com \
    /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.