diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-14 20:12:06 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-14 20:12:06 +0000 |
commit | 62b7c1447b50b9e4ec23c06208d17e35bf25eae3 (patch) | |
tree | fd45f9aa8e94de03fda084b1a3208a50a4eab795 /sys/uvm/uvm.h | |
parent | 560c37ab91e1d4be88c619415b81a531ec1be38e (diff) |
The use of uvm.pagedaemon_lock is incredibly inconsistent. only a
fraction of the wakeups and sleeps involved here actually grab that
lock. The remainder, on the other hand, always have the fpageq_lock
locked.
So, make this locking correct by switching the other users over to
fpageq_lock, too.
This would probably be better off being a semaphore, but for now at
least it's correct.
"ok, unless you want to implement semaphores" art@
Diffstat (limited to 'sys/uvm/uvm.h')
-rw-r--r-- | sys/uvm/uvm.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/uvm/uvm.h b/sys/uvm/uvm.h index 22e9323d15d..cb447f87f88 100644 --- a/sys/uvm/uvm.h +++ b/sys/uvm/uvm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm.h,v 1.29 2009/04/13 22:17:54 oga Exp $ */ +/* $OpenBSD: uvm.h,v 1.30 2009/04/14 20:12:05 oga Exp $ */ /* $NetBSD: uvm.h,v 1.24 2000/11/27 08:40:02 chs Exp $ */ /* @@ -81,8 +81,8 @@ struct uvm { struct pglist page_inactive_swp;/* pages inactive (reclaim or free) */ struct pglist page_inactive_obj;/* pages inactive (reclaim or free) */ /* Lock order: object lock, pageqlock, then fpageqlock. */ - struct mutex pageqlock; /* lock for active/inactive page q */ - struct mutex fpageqlock; /* lock for free page q */ + struct mutex pageqlock; /* lock for active/inactive page q */ + struct mutex fpageqlock; /* lock for free page q + pdaemon */ boolean_t page_init_done; /* TRUE if uvm_page_init() finished */ boolean_t page_idle_zero; /* TRUE if we should try to zero pages in the idle loop */ @@ -90,7 +90,6 @@ struct uvm { /* page daemon trigger */ int pagedaemon; /* daemon sleeps on this */ struct proc *pagedaemon_proc; /* daemon's pid */ - simple_lock_data_t pagedaemon_lock; /* aiodone daemon trigger */ int aiodoned; /* daemon sleeps on this */ |