Uiomove can only block when the segflag is UIO_USERSPACE,
otherwise we end up just doing a bcopy (or nothing) and
moving cursors. So only emit witness warnings and
set deadlock thread flags in the UIO_USERSPACE case.
Details
- Reviewers
jhb kib - Commits
- rS320738: Simplify UIO_SYSSPACE and UIO_NOCOPY paths in uiomove
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 10321 Build 10735: arc lint + arc unit
Event Timeline
sys/kern/subr_uio.c | ||
---|---|---|
221 | This re-enables witness warning for nofault case. I do not think this is correct. Simplest fix is to move the warning into else part of the if (nofault) statement below. | |
223 | I wonder if we can remove this flag already. Probably not until all buffer cache consumers, like cd9660 and other filesystems, are fixed to use vn_io_fault(). | |
224 | nofault is now silently ignored for kernel space. Might be, assert that nofault implies UIO_USERSPACE. |
sys/kern/subr_uio.c | ||
---|---|---|
221 | UIO_USERSPACE path calls maybe_yield() no matter what nofault is set to. I had assumed that required the witness warning. Is this assumption incorrect? | |
223 | I was wondering about this. In a quick search, I could not find any callers of uiomove_nofault(), and uiomove_faultflag() is static, I thought I must be missing something. |
sys/kern/subr_uio.c | ||
---|---|---|
223 | The nofault facility AKA TDP_NOFAULTING is actively used. Perhaps the uiomove_nofault() way of entering the nofault thread state became unused due to circumstances and code changes. I do not think that it should be removed now, because the interface itself is potentially useful and can become utilized again in tree. |
sys/kern/subr_uio.c | ||
---|---|---|
223 | OK. To be clear, I meant the uiomove_nofault() entry point, not TDP_NOFAULTING. If you feel it should be preserved, I'm fine with that. Thanks for the quick feedback! |