lkml.org 
[lkml]   [1999]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] shm bug introduced with pagecache in 2.3.11
On Thu, 25 Nov 1999, Linus Torvalds wrote:

>In 2.3.x, we can use the same trivial approach to protect against threads.

For the allocation is trivial of course (I was just doing that in shm.c).

But I am not been trivially succesfully in fixing the shm swapin races
with "read pte with spinlock acquired, release the spinlock, reacquire the
spinlock and the check if the pte is changed". That's why I added the
spinlock. The _main_ problem I had is that to swapout we have to grab the
kernel lock and we'll sleep and so I would need to acquire the spinlocks
in inverse order (deadlock prone). So I givenup and I took the _trivial_
mainstream way to use the semaphore to protect multiple thread accesses
(also for shm.c using a semaphore is less interesting as shm.c can't do
I/O in the nopage operation unless it's a swapin).

I hope I was missing something and that's simpler...

Andrea


-
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:55    [W:0.278 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site