From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Dmitriy Monakhov <dmonakhov@sw.ru>
Cc: Andrew Morton <akpm@osdl.org>,
Dmitriy Monakhov <dmonakhov@openvz.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Memory Management <linux-mm@kvack.org>,
devel@openvz.org, ext2-devel@lists.sourceforge.net,
Andrey Savochkin <saw@swsoft.com>
Subject: Re: [RFC][PATCH] EXT3: problem with page fault inside a transaction
Date: Thu, 12 Oct 2006 18:31:23 +1000 [thread overview]
Message-ID: <452DFD5B.8080409@yahoo.com.au> (raw)
In-Reply-To: <87lknmgeaz.fsf@sw.ru>
Dmitriy Monakhov wrote:
> Andrew Morton <akpm@osdl.org> writes:
>>With the stuff Nick and I are looking at, we won't take pagefaults inside
>>prepare_write()/commit_write() any more.
>
> I'sorry may be i've missed something, but how cant you prevent this?
>
> Let's look at generic_file_buffered_write:
> #### force page fault
> fault_in_pages_readable();
>
> ### find and lock page
> __grab_cache_page()
>
> #### allocate blocks.This may result in low memory condition
> #### try_to_free_pages->shrink_caches() and etc.
> a_ops->prepare_write()
>
> ### can anyone guarantee that page fault hasn't happened by now ?
Yes. Do an atomic copy, which will early exit from the pagefault handler
and return a short copy. Then close up the write, drop the page lock,
and rerun the fault_in_pages_readable, which will do the full pagefaults
for us, then try again.
Regardless of what you do to ext3, the VM just can't handle a fault
here anyway.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
WARNING: multiple messages have this Message-ID (diff)
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Dmitriy Monakhov <dmonakhov@sw.ru>
Cc: Andrew Morton <akpm@osdl.org>,
Dmitriy Monakhov <dmonakhov@openvz.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Memory Management <linux-mm@kvack.org>,
devel@openvz.org, ext2-devel@lists.sourceforge.net,
Andrey Savochkin <saw@swsoft.com>
Subject: Re: [RFC][PATCH] EXT3: problem with page fault inside a transaction
Date: Thu, 12 Oct 2006 18:31:23 +1000 [thread overview]
Message-ID: <452DFD5B.8080409@yahoo.com.au> (raw)
In-Reply-To: <87lknmgeaz.fsf@sw.ru>
Dmitriy Monakhov wrote:
> Andrew Morton <akpm@osdl.org> writes:
>>With the stuff Nick and I are looking at, we won't take pagefaults inside
>>prepare_write()/commit_write() any more.
>
> I'sorry may be i've missed something, but how cant you prevent this?
>
> Let's look at generic_file_buffered_write:
> #### force page fault
> fault_in_pages_readable();
>
> ### find and lock page
> __grab_cache_page()
>
> #### allocate blocks.This may result in low memory condition
> #### try_to_free_pages->shrink_caches() and etc.
> a_ops->prepare_write()
>
> ### can anyone guarantee that page fault hasn't happened by now ?
Yes. Do an atomic copy, which will early exit from the pagefault handler
and return a short copy. Then close up the write, drop the page lock,
and rerun the fault_in_pages_readable, which will do the full pagefaults
for us, then try again.
Regardless of what you do to ext3, the VM just can't handle a fault
here anyway.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-10-12 8:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 5:57 [RFC][PATCH] EXT3: problem with page fault inside a transaction Dmitriy Monakhov
2006-10-12 5:57 ` Dmitriy Monakhov
2006-10-12 6:43 ` Andrew Morton
2006-10-12 6:43 ` Andrew Morton
2006-10-12 7:01 ` Nick Piggin
2006-10-12 7:01 ` Nick Piggin
2006-10-12 7:53 ` Dmitriy Monakhov
2006-10-12 7:53 ` Dmitriy Monakhov
2006-10-12 8:31 ` Nick Piggin [this message]
2006-10-12 8:31 ` Nick Piggin
2006-10-12 8:37 ` Andrew Morton
2006-10-12 8:37 ` Andrew Morton
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=452DFD5B.8080409@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=devel@openvz.org \
--cc=dmonakhov@openvz.org \
--cc=dmonakhov@sw.ru \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=saw@swsoft.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.