public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Sage Weil <sage@newdream.net>
Cc: Ted Ts'o <tytso@mit.edu>, Boaz Harrosh <bharrosh@panasas.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH, RFC] Don't do page stablization if !CONFIG_BLKDEV_INTEGRITY
Date: Wed, 14 Mar 2012 19:10:21 -0700	[thread overview]
Message-ID: <4F614F8D.5010702@amacapital.net> (raw)
In-Reply-To: <Pine.LNX.4.64.1203080829300.23757@cobra.newdream.net>

On 03/08/2012 08:43 AM, Sage Weil wrote:
> On Thu, 8 Mar 2012, Ted Ts'o wrote:
>> On Wed, Mar 07, 2012 at 10:27:43PM -0800, Sage Weil wrote:
>>>
>>> This avoids the problem for devices that don't need stable pages, but 
>>> doesn't help for those that do (btrfs, raid, iscsi, dif/dix, etc.).  It 
>>> seems to me like a more elegant solution would be to COW the page in the 
>>> address_space so that you get stable writeback pages without blocking.  
>>> That's clearly more complex, and I'm sure there are a range of issues 
>>> involved in making that work, but I would hope that it would be doable 
>>> with generic MM infrastructure so that everyone would benefit.
>>
>> Well, even doing a COW (or anything that involves messing with page
>> tables) is not free.  So even if we can make the cost of stable
>> writeback pages cheaper, if we can completely avoid the cost, this
>> would be good.  I'd also rather fix the performance regression sooner
>> rather than later, and I suspect the COW solution is not something
>> that could be prepared in time for the upcoming merge window.
> 
> Definitely.  This patch looks like a fine approach for your situation. I 
> just don't want the subject to come up without talking about a general 
> solution.  And it's very interesting to hear about a (simple) workload 
> that is affected by the wait_on_page_writeback().

I'll add a simple workload.  I have a soft real-time program that has
two threads.  One of them fallocates some files, mmaps them, mlocks
them, and touches all the pages to prefault them.  (This thread has no
real-time constraints -- it just needs to keep up.)  The other thread
writes to the files.

On Windows, this works very well.  On Linux without stable pages, it
almost works.  With stable pages, it's a complete disaster.  No amount
of minimizing the amount of time that pages under writeback can cause
writers to sleep will help -- writers *must not wait for io* when
writing mlocked, prefaulted pages for my code to work.

(The other issue involves file_update_time.  I'll send a fix eventually.)

FWIW, it would be really nice if there was a way to lock a mapping so
hard that accesses are guaranteed to not even cause soft faults.  We're
far from being able to do that now, though.

--Andy

  reply	other threads:[~2012-03-15  2:10 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 23:40 [PATCH, RFC] Don't do page stablization if !CONFIG_BLKDEV_INTEGRITY Theodore Ts'o
2012-03-07 23:54 ` Eric Sandeen
2012-03-08  0:05   ` Darrick J. Wong
2012-03-08  2:18     ` Darrick J. Wong
2012-03-08  3:00       ` Boaz Harrosh
2012-03-08  3:21         ` Boaz Harrosh
2012-03-08  2:39   ` Zach Brown
2012-03-08 15:54     ` Ted Ts'o
2012-03-08 18:09       ` Chris Mason
2012-03-08 20:20         ` Boaz Harrosh
2012-03-08 20:37           ` Chris Mason
2012-03-08 20:42             ` Jeff Moyer
2012-03-08 20:55               ` Chris Mason
2012-03-08 21:12               ` Ted Ts'o
2012-03-08 21:20                 ` Chris Mason
2012-03-09  8:11                   ` Dave Chinner
2012-03-08 20:50             ` Boaz Harrosh
2012-03-08 23:32               ` Dave Chinner
2012-03-08 21:24           ` Ted Ts'o
2012-03-08 21:38             ` Chris Mason
2012-03-08 21:41               ` Ted Ts'o
2012-03-09  1:02                 ` Chris Mason
2012-03-09  1:08                   ` Martin K. Petersen
2012-03-09 16:20                   ` Ted Ts'o
2012-03-08 21:52             ` Boaz Harrosh
2012-03-08  0:23 ` Boaz Harrosh
2012-03-08  3:45   ` Martin K. Petersen
2012-03-08  4:37     ` Boaz Harrosh
2012-03-08  6:27       ` Sage Weil
2012-03-08 15:43         ` Ted Ts'o
2012-03-08 16:36           ` Martin K. Petersen
2012-03-08 16:43           ` Sage Weil
2012-03-15  2:10             ` Andy Lutomirski [this message]
2012-03-15  4:46               ` Boaz Harrosh
2012-03-15  5:02                 ` Andy Lutomirski

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=4F614F8D.5010702@amacapital.net \
    --to=luto@amacapital.net \
    --cc=bharrosh@panasas.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sage@newdream.net \
    --cc=tytso@mit.edu \
    /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