lkml.org 
[lkml]   [1998]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: if my new update_shared_mappings() races, vmtruncate is just racing , too


On Wed, 23 Dec 1998, Andrea Arcangeli wrote:
?
> It seems to me that vmtruncate is playing with the pte/pgd of other
> processes without hoding any mmap_semaphore.
>
> I guess the reason this is safe is that lock_kernel protect us from
> another CPU that would play with pte/pgd at the same time.

Yes.

I tried to make us able to play with the page table entries without
holding the kernel lock, but it wasn't possible to do for 2.2.
Conceptually the mm semaphore _should_ serialize all accesses to the page
table, but making the page-out logic get the mm semaphore is just too
hard: I couldn't do it without some really obvious deadlock issues, and I
suspect it needs some serious designing to get right.

As a result, the rule really is: it's ok to _remove_ a page table entry
without holding the mm lock, but you have to hold the kernel lock to do
so. It's not a good rule, but it at least doesn't deadlock.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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