lkml.org 
[lkml]   [2004]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 230-objrmap fixes for 2.6.3-mjb2
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.597 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site