[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrWNCy0VN-rQM-xPksiJ50DW-KM+w2NBprNOPhvnizZW=Q@mail.gmail.com>
Date: Tue, 1 Nov 2011 18:51:04 -0700
From: Andy Lutomirski <luto@...capital.net>
To: Jan Kara <jack@...e.cz>
Cc: Andreas Dilger <adilger@...ger.ca>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: Latency writing to an mlocked ext4 mapping
On Tue, Nov 1, 2011 at 4:10 PM, Andy Lutomirski <luto@...capital.net> wrote:
> On Tue, Nov 1, 2011 at 4:03 PM, Jan Kara <jack@...e.cz> wrote:
>>
>> Avoiding IO during a minor fault would be a decent thing which might be
>> worth pursuing. As you properly noted "stable pages during writeback"
>> requirement is one obstacle which won't be that trivial to avoid though...
>
> There's an easy solution that would be good enough for me: add a mount
> option to turn off stable pages.
>
> Is the other problem just a race, perhaps? __block_page_mkwrite calls
> __block_write_begin (which calls get_block, which I think is where the
> latency comes from) *before* wait_on_page_writeback, which means that
> there might not be any space allocated yet.
I think I'm right (other than calling it a race). If I change my code to do:
- map the file (with MCL_FUTURE set)
- fallocate
- dirty all pages
- fsync
- dirty all pages again
in the non-real-time thread, then a short test that was a mediocre
reproducer seems to work.
This is annoying, though -- I'm not generating twice as much write I/O
as I used to. Is there any way to force the delalloc code to do its
thing without triggering writeback? I don't think fallocate has this
effect.
--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists