All of lore.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: djwong@us.ibm.com
Cc: Jan Kara <jack@suse.cz>, Theodore Tso <tytso@mit.edu>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jens Axboe <axboe@kernel.dk>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Jeff Layton <jlayton@redhat.com>,
	Dave Chinner <david@fromorbit.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org, Chris Mason <chris.mason@oracle.com>,
	Joel Becker <jlbec@evilplan.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-ext4@vger.kernel.org, Mingming Cao <mcao@us.ibm.com>
Subject: Re: [PATCHSET v3.1 0/7] data integrity: Stabilize pages during writeback for various fses
Date: Tue, 17 May 2011 04:31:37 +0900	[thread overview]
Message-ID: <87oc3230iu.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20110516184736.GL20579@tux1.beaverton.ibm.com> (Darrick J. Wong's message of "Mon, 16 May 2011 11:47:36 -0700")

"Darrick J. Wong" <djwong@us.ibm.com> writes:

>> OK. E.g. usual workload on desktop, but FS like ext2/fat.
>
> In the frequent rewrite case, here's what you get:
>
> Regular disk: (possibly garbage) write, followed by a second write to make the
> disk reflect memory contents.
>
> RAID w/ shadow pages: two writes, both consistent.  Higher memory consumption.
>
> T10 DIF disk: disk error any time the CPU modifies a page that the disk
> controller is DMA'ing out of memory.  I suppose one could simply retry the
> operation if the page is dirty, but supposing memory writes are happening fast
> enough that the retries also produce disk errors, _nothing_ ever gets written.
>
> With the new stable-page-writes patchset, the garbage write/disk error symptoms
> go away since the processes block instead of creating this window where it's
> not clear whether the disk's copy of the data is consistent.  I could turn the
> wait_on_page_writeback calls into some sort of page migration if the
> performance turns out to be terrible, though I'm still working on quantifying
> the impact.  Some people pointed out that sqlite tends to write the same blocks
> frequently, though I wonder if sqlite actually tries to write memory pages
> while syncing them?
>
> One use case where I could see a serious performance hit happening is the case
> where some app writes a bunch of memory pages, calls sync to force the dirty
> pages to disk, and /must/ resume writing those memory pages before the sync
> completes.  The page migration would of course help there, provided a memory
> page can be found in less time than an I/O operation.
>
> Someone commented on the LWN article about this topic, claiming that he had a
> program that couldn't afford to block on writes to mlock()'d memory.  I'm not
> sure how to fix that program, because if memory writes never coordinate with
> disk writes and the other threads are always writing memory, I wonder how the
> copy on disk isn't always indeterminate.

I'm not thinking data page is special operation for doing this (at least
logically). In other word, if you are talking about only data page, you
shouldn't send patches for metadata with it.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: djwong@us.ibm.com
Cc: Jan Kara <jack@suse.cz>, Theodore Tso <tytso@mit.edu>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Jens Axboe <axboe@kernel.dk>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Jeff Layton <jlayton@redhat.com>,
	Dave Chinner <david@fromorbit.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org, Chris Mason <chris.mason@oracle.com>,
	Joel Becker <jlbec@evilplan.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-ext4@vger.kernel.org, Mingming Cao <mcao@us.ibm.com>
Subject: Re: [PATCHSET v3.1 0/7] data integrity: Stabilize pages during writeback for various fses
Date: Tue, 17 May 2011 04:31:37 +0900	[thread overview]
Message-ID: <87oc3230iu.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20110516184736.GL20579@tux1.beaverton.ibm.com> (Darrick J. Wong's message of "Mon, 16 May 2011 11:47:36 -0700")

"Darrick J. Wong" <djwong@us.ibm.com> writes:

>> OK. E.g. usual workload on desktop, but FS like ext2/fat.
>
> In the frequent rewrite case, here's what you get:
>
> Regular disk: (possibly garbage) write, followed by a second write to make the
> disk reflect memory contents.
>
> RAID w/ shadow pages: two writes, both consistent.  Higher memory consumption.
>
> T10 DIF disk: disk error any time the CPU modifies a page that the disk
> controller is DMA'ing out of memory.  I suppose one could simply retry the
> operation if the page is dirty, but supposing memory writes are happening fast
> enough that the retries also produce disk errors, _nothing_ ever gets written.
>
> With the new stable-page-writes patchset, the garbage write/disk error symptoms
> go away since the processes block instead of creating this window where it's
> not clear whether the disk's copy of the data is consistent.  I could turn the
> wait_on_page_writeback calls into some sort of page migration if the
> performance turns out to be terrible, though I'm still working on quantifying
> the impact.  Some people pointed out that sqlite tends to write the same blocks
> frequently, though I wonder if sqlite actually tries to write memory pages
> while syncing them?
>
> One use case where I could see a serious performance hit happening is the case
> where some app writes a bunch of memory pages, calls sync to force the dirty
> pages to disk, and /must/ resume writing those memory pages before the sync
> completes.  The page migration would of course help there, provided a memory
> page can be found in less time than an I/O operation.
>
> Someone commented on the LWN article about this topic, claiming that he had a
> program that couldn't afford to block on writes to mlock()'d memory.  I'm not
> sure how to fix that program, because if memory writes never coordinate with
> disk writes and the other threads are always writing memory, I wonder how the
> copy on disk isn't always indeterminate.

I'm not thinking data page is special operation for doing this (at least
logically). In other word, if you are talking about only data page, you
shouldn't send patches for metadata with it.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2011-05-16 19:31 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 23:03 [PATCHSET v3.1 0/7] data integrity: Stabilize pages during writeback for various fses Darrick J. Wong
2011-05-09 23:03 ` Darrick J. Wong
2011-05-09 23:03 ` Darrick J. Wong
2011-05-09 23:03 ` Darrick J. Wong
2011-05-09 23:03 ` [PATCH 1/7] mm: Wait for writeback when grabbing pages to begin a write Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03 ` [PATCH 2/7] fs: block_page_mkwrite should wait for writeback to finish Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-10 12:41   ` Jan Kara
2011-05-10 12:41     ` Jan Kara
2011-05-10 17:12     ` Darrick J. Wong
2011-05-10 17:12       ` Darrick J. Wong
2011-05-09 23:03 ` [PATCH 3/7] mm: Provide stub page_mkwrite functionality to stabilize pages during writes Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03 ` [PATCH 4/7] ext4: Clean up some wait_on_page_writeback calls Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-18 18:16   ` [4/7] " Ted Ts'o
2011-05-18 18:16     ` Ted Ts'o
2011-05-09 23:03 ` [PATCH 5/7] ext4: Wait for writeback to complete while making pages writable Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-09 23:03   ` Darrick J. Wong
2011-05-18 18:17   ` [5/7] " Ted Ts'o
2011-05-18 18:17     ` Ted Ts'o
2011-05-09 23:04 ` [PATCH 6/7] ext2: Lock buffer_head during metadata update Darrick J. Wong
2011-05-09 23:04   ` Darrick J. Wong
2011-05-09 23:04   ` Darrick J. Wong
2011-05-09 23:04   ` Darrick J. Wong
2011-05-09 23:04 ` [PATCH 7/7] fat: Lock buffer_head during metadata updates Darrick J. Wong
2011-05-09 23:04   ` Darrick J. Wong
2011-05-09 23:04   ` Darrick J. Wong
2011-05-09 23:04   ` Darrick J. Wong
2011-05-10  0:06 ` [PATCHSET v3.1 0/7] data integrity: Stabilize pages during writeback for various fses Dave Chinner
2011-05-10  0:06   ` Dave Chinner
2011-05-10  1:59 ` OGAWA Hirofumi
2011-05-10  1:59   ` OGAWA Hirofumi
2011-05-10 12:38   ` Jan Kara
2011-05-10 12:38     ` Jan Kara
2011-05-10 13:12     ` OGAWA Hirofumi
2011-05-10 13:12       ` OGAWA Hirofumi
2011-05-10 13:29       ` Jan Kara
2011-05-10 13:29         ` Jan Kara
2011-05-10 13:46         ` OGAWA Hirofumi
2011-05-10 13:46           ` OGAWA Hirofumi
2011-05-10 14:05           ` OGAWA Hirofumi
2011-05-10 14:05             ` OGAWA Hirofumi
2011-05-10 14:54             ` Jan Kara
2011-05-10 14:54               ` Jan Kara
2011-05-10 16:12               ` OGAWA Hirofumi
2011-05-10 16:12                 ` OGAWA Hirofumi
2011-05-10 16:22                 ` Jan Kara
2011-05-10 16:22                   ` Jan Kara
2011-05-10 16:28                   ` OGAWA Hirofumi
2011-05-10 16:28                     ` OGAWA Hirofumi
2011-05-16 18:47                     ` Darrick J. Wong
2011-05-16 18:47                       ` Darrick J. Wong
2011-05-16 19:31                       ` OGAWA Hirofumi [this message]
2011-05-16 19:31                         ` OGAWA Hirofumi
2011-05-17  1:23                         ` Darrick J. Wong
2011-05-17  1:23                           ` Darrick J. Wong
2011-05-17  3:30                           ` OGAWA Hirofumi
2011-05-17  3:30                             ` OGAWA Hirofumi
2011-10-23 16:38                   ` Andy Lutomirski
2011-10-23 16:38                     ` Andy Lutomirski
2011-05-10 13:36   ` Christoph Hellwig
2011-05-10 13:36     ` Christoph Hellwig
2011-05-10 13:52     ` OGAWA Hirofumi
2011-05-10 13:52       ` OGAWA Hirofumi
2011-05-10 14:49       ` Jan Kara
2011-05-10 14:49         ` Jan Kara
2011-05-10 15:24         ` OGAWA Hirofumi
2011-05-10 15:24           ` OGAWA Hirofumi
2011-05-10 16:18           ` Jan Kara
2011-05-10 16:18             ` Jan Kara
2011-05-10 16:29             ` OGAWA Hirofumi
2011-05-10 16:29               ` OGAWA Hirofumi
2011-05-10 17:03               ` Jan Kara
2011-05-10 17:03                 ` Jan Kara
2011-05-10 17:03           ` Christoph Hellwig
2011-05-10 17:03             ` Christoph Hellwig
2011-05-10 20:50             ` OGAWA Hirofumi
2011-05-10 20:50               ` OGAWA Hirofumi
2011-05-11  5:55               ` Christoph Hellwig
2011-05-11  5:55                 ` Christoph Hellwig
2011-05-11  9:36                 ` OGAWA Hirofumi
2011-05-11  9:36                   ` OGAWA Hirofumi
2011-05-10 12:51 ` Jan Kara
2011-05-10 12:51   ` Jan Kara
2011-05-10 16:24   ` Chris Mason
2011-05-10 16:24     ` Chris Mason
2011-05-11 18:19   ` Darrick J. Wong
2011-05-11 18:19     ` Darrick J. Wong
2011-05-12  9:42     ` Jan Kara
2011-05-12  9:42       ` Jan Kara
2011-05-16 18:49       ` Darrick J. Wong
2011-05-16 18:49         ` Darrick J. Wong
2011-05-16 18:59         ` Jan Kara
2011-05-16 18:59           ` Jan Kara
2011-05-16 19:09           ` Darrick J. Wong
2011-05-16 19:09             ` Darrick J. Wong
2011-05-16 19:04 ` Darrick J. Wong
2011-05-16 19:04   ` Darrick J. Wong
2011-05-16 19:04   ` Darrick J. Wong
2011-05-16 19:04   ` Darrick J. Wong
2011-05-16 20:27   ` Christoph Hellwig
2011-05-16 20:27     ` Christoph Hellwig
2011-05-16 20:55     ` Darrick J. Wong
2011-05-16 20:55       ` Darrick J. Wong
2011-05-17 14:01       ` Christoph Hellwig
2011-05-17 14:01         ` Christoph Hellwig

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=87oc3230iu.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=axboe@kernel.dk \
    --cc=chris.mason@oracle.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=david@fromorbit.com \
    --cc=djwong@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=jlayton@redhat.com \
    --cc=jlbec@evilplan.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mcao@us.ibm.com \
    --cc=tytso@mit.edu \
    --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 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.