From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: Page fault scalability patch V18: Drop first acquisition of ptl
Date: Thu, 03 Mar 2005 01:45:07 +0000 [thread overview]
Message-ID: <20050302174507.7991af94.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0503011951100.25441@schroedinger.engr.sgi.com>
Christoph Lameter <clameter@sgi.com> wrote:
>
> ...
> static int do_wp_page(struct mm_struct *mm, struct vm_area_struct * vma,
> unsigned long address, pte_t *page_table, pmd_t *pmd, pte_t pte)
> @@ -1306,22 +1308,25 @@ static int do_wp_page(struct mm_struct *
> flush_cache_page(vma, address);
> entry = maybe_mkwrite(pte_mkyoung(pte_mkdirty(pte)),
> vma);
> - ptep_set_access_flags(vma, address, page_table, entry, 1);
> - update_mmu_cache(vma, address, entry);
> + /*
> + * If the bits are not updated then another fault
> + * will be generated with another chance of updating.
> + */
> + if (ptep_cmpxchg(page_table, pte, entry))
> + update_mmu_cache(vma, address, entry);
> + else
> + inc_page_state(cmpxchg_fail_flag_reuse);
> pte_unmap(page_table);
> - spin_unlock(&mm->page_table_lock);
> + page_table_atomic_stop(mm);
> return VM_FAULT_MINOR;
> }
> }
> pte_unmap(page_table);
> + page_table_atomic_stop(mm);
>
> /*
> * Ok, we need to copy. Oh, well..
> */
> - if (!PageReserved(old_page))
> - page_cache_get(old_page);
hm, this seems to be an unrelated change. You're saying that this page is
protected from munmap() by munmap()'s down_write(mmap_sem), yes? What
stops memory reclaim from freeing old_page?
> static int do_swap_page(struct mm_struct * mm,
> struct vm_area_struct * vma, unsigned long address,
> @@ -1727,12 +1733,11 @@ static int do_swap_page(struct mm_struct
> grab_swap_token();
> }
>
> - mark_page_accessed(page);
> + SetPageReferenced(page);
Another unrelated change. IIRC, this is indeed equivalent, but I forget
why. Care to remind me?
Overall, do we know which architectures are capable of using this feature?
Would ppc64 (and sparc64?) still have a problem with page_table_lock no
longer protecting their internals?
I'd really like to see other architecture maintainers stand up and say
"yes, we need this".
Did you consider doing the locking at the pte page level? That could be
neater than all those games with atomic pte operattions.
We need to do the big page-table-walker code consolidation/cleanup. That
might have some overlap.
next prev parent reply other threads:[~2005-03-03 1:45 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-02 3:49 Page fault scalability patch V18: Overview Christoph Lameter
2005-03-02 3:50 ` Page fault scalability patch V18: atomic pte ops, pte_cmpxchg Christoph Lameter
2005-03-02 3:51 ` Page fault scalability patch V18: abstract rss counter ops Christoph Lameter
2005-03-02 3:51 ` Page fault scalability patch V18: Drop first acquisition of ptl Christoph Lameter
2005-03-03 1:45 ` Andrew Morton [this message]
2005-03-03 2:13 ` Christoph Lameter
2005-03-03 2:55 ` Andrew Morton
2005-03-03 3:17 ` Christoph Lameter
2005-03-03 4:14 ` Andrew Morton
2005-03-03 4:27 ` Christoph Lameter
2005-03-03 4:56 ` Andrew Morton
2005-03-03 5:17 ` Christoph Lameter
2005-03-03 5:37 ` Andrew Morton
2005-03-03 5:48 ` Christoph Lameter
2005-03-03 6:13 ` Christoph Lameter
2005-03-03 6:20 ` Andrew Morton
2005-03-03 16:54 ` Christoph Lameter
2005-03-03 21:20 ` Andrew Morton
2005-03-03 22:14 ` Christoph Lameter
2005-03-04 16:44 ` Christoph Lameter
2005-03-04 17:09 ` Hugh Dickins
2005-03-04 18:29 ` Christoph Lameter
2005-03-04 19:08 ` Hugh Dickins
2005-03-31 6:55 ` Avoid spurious page faults by avoiding pte_clear -> set pte Christoph Lameter
2005-03-04 16:46 ` Page fault scalability patch V18: Drop first acquisition of ptl Christoph Lameter
2005-03-03 5:00 ` Paul Mackerras
2005-03-03 5:19 ` Christoph Lameter
2005-03-03 5:38 ` David S. Miller
2005-03-03 5:51 ` Christoph Lameter
2005-03-03 6:11 ` Benjamin Herrenschmidt
2005-03-03 16:52 ` Christoph Lameter
2005-03-03 5:54 ` Benjamin Herrenschmidt
2005-03-03 6:37 ` Nick Piggin
2005-03-03 6:30 ` Benjamin Herrenschmidt
2005-03-03 7:44 ` Nick Piggin
2005-03-03 17:43 ` David S. Miller
2005-03-03 5:24 ` Nick Piggin
2005-03-02 3:52 ` Page fault scalability patch V18: No page table lock in do_anonymous_page Christoph Lameter
2005-03-04 2:18 ` Page fault scalability patch V18: Overview Darren Williams
2005-03-04 2:47 ` Darren Williams
2005-03-04 16:15 ` Christoph Lameter
2005-03-06 21:49 ` Darren Williams
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=20050302174507.7991af94.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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