From: neil@tc-1-192.ariake.gol.ne.jp
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Linux-MM <linux-mm@kvack.org>
Subject: Re: A couple of questions
Date: Tue, 16 Mar 1999 07:46:06 +0900 [thread overview]
Message-ID: <19990316074606.A10483@tc-1-192.ariake.gol.ne.jp> (raw)
In-Reply-To: <199903151858.SAA02057@dax.scot.redhat.com>; from Stephen C. Tweedie on Mon, Mar 15, 1999 at 06:58:26PM +0000
Hi Stephen,
Stephen C. Tweedie wrote:-
> Hi,
>
[..snip..]
>
> > 2) The last 2 of the 3 branches to end_wp_page seem to me to be
> > impossible code paths.
>
> > if (!pte_present(pte))
> > goto end_wp_page;
> > if (pte_write(pte))
> > goto end_wp_page;
>
> No, the start of do_wp_page() looks like:
>
> pte = *page_table;
> new_page = __get_free_page(GFP_USER);
>
> and the get_free_page() call can block if we are out of memory, dropping
> the kernel lock in the process. The page table can be modified by
> kswapd during this interval.
Thanks for your reply. I think you've missed my point on this one.
The variable "pte" is set before calling __get_free_page(), and being
local cannot be modified by other processes. Hence I still believe
the 2 branches shown are impossible, their negative having been the
condition for entering do_wp_page().
The case you mention is captured by the initial test
if (pte_val(*page_table) != pte_val(pte))
goto end_wp_page;
performed before the two above. Do you agree?
Cheers,
Neil.
--
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-03-15 22:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-02 13:11 Neil Booth
1999-03-15 18:58 ` Stephen C. Tweedie
1999-03-15 22:46 ` neil [this message]
1999-03-16 12:22 ` Stephen C. Tweedie
1999-03-16 2:11 ` Andrea Arcangeli
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=19990316074606.A10483@tc-1-192.ariake.gol.ne.jp \
--to=neil@tc-1-192.ariake.gol.ne.jp \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox