看板 FB_hackers 關於我們 聯絡資訊
Murty, Ravi wrote: > That's actually what I was trying to get to. > > If I look at vm_daemon(), it checks to see if every thread of the > process is running, on the runq or sleeping. If any threads fails the > condition - and I can think of the case where a thread is blocked > waiting for a lock - it is not a target to be swapped out. I guess this > means that if a thread is holding a lock, it can be swapped out. no. because if it holds a lock it must be in the run queue, running or waiting for another lock. no other state is permitted. > How > does this guarantee that the thread is not holding a kernel lock? Why > don't they allow threads waiting for a lock (blocked threads/processes) > to be swapped out? > > Related question: how can a process/thread running on a CPU be swapped > out, do they suspend the threads before they pull out memory from > underneath them? not sure, I'd have to read the code again. > > Thanks > Ravi > _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"