[DGD] Swapping users
Felix A. Croes
felix at dworkin.nl
Sun Dec 7 14:36:03 CET 2014
Blain <blain20 at gmail.com> wrote:
> I've been running a bare bones lib on my new BRIX machine and a friend of
> mine was idling a lot on it using the kernel user. I noticed one day that
> I received notification of him 'going' linkdead. I'm sure he was linkdead
> long before, but I figure his user object might've been swapped out at some
> point due to disuse and my logging in caused it to swap in when it
> announces my connecting. My question is, is it possible to prevent user
> objects from swapping out (if that is indeed what occurred here) so that it
> can get updates like linkdeath immediately? Or is there a good place in
> the kernel I can force an update when close() is received from the game
> driver, perhaps?
You misunderstand the effect of swapping. Function calls in swapped-out
objects are not cancelled, the object is immediately swapped in and the
call proceeds. The linkdeath you observed was not delayed because your
friend's user object was swapped out, but because such a condition can
only be detected when an attempt to deliver new data on the connection
fails.
So in a way, it was your own idleness that contributed to this long-
delayed linkdeath.
Swapping appears to confuse many people. Think of DGD's swapfile/snapshots
as a database. Objects that are not "swapped out" are in the memory cache
of this database.
Regards,
Felix Croes
More information about the DGD
mailing list