Subject: Re: map user memory in kernel
To: Steven M. Bellovin <smb@cs.columbia.edu>
From: Eric Haszlakiewicz <erh@jodi.nimenees.com>
List: tech-kern
Date: 11/05/2005 10:45:52
On Sat, Nov 05, 2005 at 11:15:16AM -0500, Steven M. Bellovin wrote:
> Unless I badly misunderstand the situation, it doesn't matter. The
> "address" is nothing of the sort. Think of it as a hash value; any
> process that is sleeping on that hash value will be awakened, but they
> should all check to see that the situation they're really waiting for
> has occurred. Otherwise, they sleep again.
>
> To put it more bluntly: the system would still work correctly if every
> process used 0 as its sleep "address". It wouldn't be very efficient,
> which is why things aren't done that way, but it would still be correct.
It _does_ matter if you're using the physical address as the key
to pass to sleep/wakeup. It wouldn't work correctly if the page got
paged back in to a different physical address. Then you've called sleep
with one value and might call wakeup with a different one.
eric