aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-06-03 01:47:37 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-06-03 01:47:37 +0000
commitfa2a4d059528902d4cc43aac4a5e0aac3e70b584 (patch)
tree4ec923639b76e4b631bd73b4a91f5dd83dbbfce9 /sys/amd64
parentd97e0534fa13e72f4cbf4c08785543b241a16cd7 (diff)
downloadsrc-fa2a4d059528902d4cc43aac4a5e0aac3e70b584.tar.gz
src-fa2a4d059528902d4cc43aac4a5e0aac3e70b584.zip
Move TDF_DEADLKTREAT into td_pflags (and rename it accordingly) to avoid
having to acquire sched_lock when manipulating it in lockmgr(), uiomove(), and uiomove_fromphys(). Reviewed by: jhb
Notes
Notes: svn path=/head/; revision=130023
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/uio_machdep.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c
index 63057b70484e..dfa11ab5364c 100644
--- a/sys/amd64/amd64/uio_machdep.c
+++ b/sys/amd64/amd64/uio_machdep.c
@@ -71,10 +71,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread,
("uiomove_fromphys proc"));
if (td != NULL) {
- mtx_lock_spin(&sched_lock);
- save = td->td_flags & TDF_DEADLKTREAT;
- td->td_flags |= TDF_DEADLKTREAT;
- mtx_unlock_spin(&sched_lock);
+ save = td->td_pflags & TDP_DEADLKTREAT;
+ td->td_pflags |= TDP_DEADLKTREAT;
}
while (n > 0 && uio->uio_resid) {
iov = uio->uio_iov;
@@ -118,10 +116,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
n -= cnt;
}
out:
- if (td != NULL && save == 0) {
- mtx_lock_spin(&sched_lock);
- td->td_flags &= ~TDF_DEADLKTREAT;
- mtx_unlock_spin(&sched_lock);
- }
+ if (td != NULL && save == 0)
+ td->td_pflags &= ~TDP_DEADLKTREAT;
return (error);
}