From: Andrea Arcangeli <andrea@suse.de>
To: linux-kernel@vger.kernel.org
Cc: "Martin J. Bligh" <mbligh@aracnet.com>,
Hugh Dickins <hugh@veritas.com>,
William Lee Irwin III <wli@holomorphy.com>
Subject: Re: 230-objrmap fixes for 2.6.3-mjb2
Date: Thu, 25 Mar 2004 22:45:29 +0100 [thread overview]
Message-ID: <20040325214529.GJ20019@dualathlon.random> (raw)
In-Reply-To: <20040303070933.GB4922@dualathlon.random>
On Wed, Mar 03, 2004 at 08:09:33AM +0100, Andrea Arcangeli wrote:
> --- sles-objrmap/mm/mmap.c.~1~ 2004-03-03 06:45:38.980596736 +0100
> +++ sles-objrmap/mm/mmap.c 2004-03-03 06:53:46.945414808 +0100
> @@ -1284,8 +1284,8 @@ int do_munmap(struct mm_struct *mm, unsi
> /*
> * Remove the vma's, and unmap the actual pages
> */
> - detach_vmas_to_be_unmapped(mm, mpnt, prev, end);
> spin_lock(&mm->page_table_lock);
> + detach_vmas_to_be_unmapped(mm, mpnt, prev, end);
> unmap_region(mm, mpnt, prev, start, end);
> spin_unlock(&mm->page_table_lock);
>
> --- sles-objrmap/mm/swapfile.c.~1~ 2004-03-03 06:45:39.023590200 +0100
> +++ sles-objrmap/mm/swapfile.c 2004-03-03 07:03:33.128301464 +0100
> @@ -499,7 +499,6 @@ static int unuse_process(struct mm_struc
> /*
> * Go through process' page directory.
> */
> - down_read(&mm->mmap_sem);
> spin_lock(&mm->page_table_lock);
> for (vma = mm->mmap; vma; vma = vma->vm_next) {
> pgd_t * pgd = pgd_offset(mm, vma->vm_start);
> @@ -507,7 +506,6 @@ static int unuse_process(struct mm_struc
> break;
> }
> spin_unlock(&mm->page_table_lock);
> - up_read(&mm->mmap_sem);
> pte_chain_free(pte_chain);
> return 0;
> }
Martin, I just found I was wrong about the above, I would been right in
the 2.4 VM, but in 2.6 the above is not needed. So you can delete the
above part from your tree too. it seems 2.6 really splitted the
page_table_lock from the mmap_sem and the only way to touch vmas is to
get the mmap_sem, the page_table_lock is unrelated to the vmas. This
wasn't the case in 2.4 where readers were allowed to take the
page_table_lock only.
next prev parent reply other threads:[~2004-03-25 21:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-03 7:09 230-objrmap fixes for 2.6.3-mjb2 Andrea Arcangeli
2004-03-03 10:58 ` Andrew Morton
2004-03-03 15:46 ` Martin J. Bligh
2004-03-03 15:58 ` Dave McCracken
2004-03-03 16:08 ` Christoph Hellwig
2004-03-03 19:04 ` Mike Kravetz
2004-03-04 15:41 ` Rik van Riel
2004-03-04 15:47 ` Christoph Hellwig
2004-03-04 16:21 ` Rik van Riel
2004-03-04 17:03 ` Matt Mackall
2004-03-03 16:57 ` Andrea Arcangeli
2004-03-03 17:07 ` Dave McCracken
2004-03-03 18:39 ` Andrea Arcangeli
2004-03-03 18:44 ` Dave McCracken
2004-03-03 18:51 ` Andrea Arcangeli
2004-03-03 19:01 ` Dave McCracken
2004-03-03 21:05 ` Andrea Arcangeli
2004-03-03 21:39 ` Martin J. Bligh
2004-03-03 23:16 ` Andrea Arcangeli
2004-03-03 17:06 ` Andrea Arcangeli
2004-03-03 15:54 ` Martin J. Bligh
2004-03-03 16:14 ` Andrea Arcangeli
2004-03-25 21:45 ` Andrea Arcangeli [this message]
2004-03-26 11:57 ` Hugh Dickins
2004-03-26 18:02 ` Andrea Arcangeli
2004-03-26 23:25 ` Andrew Morton
2004-03-27 14:24 ` Andrea Arcangeli
2004-03-27 15:29 ` Dave McCracken
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=20040325214529.GJ20019@dualathlon.random \
--to=andrea@suse.de \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.com \
--cc=wli@holomorphy.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