diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2026-01-29 08:09:00 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2026-01-29 23:26:16 +0000 |
| commit | b249cb2b18b3fddae186d45fe6d984fc7bde10c4 (patch) | |
| tree | 2c23463ea2e84627d67c2e129371e7b4ac4b505c /sbin/fsck_ffs/ssh:/anongit@git.FreeBSD.org/(public-mirror) | |
| parent | 0730a05cd383276ca8eedf295509e869ac9b88a0 (diff) | |
maybe_resched() needs to schedule TDA_SCHED for curthread, but this
requires taking curthread lock while owning some other thread lock.
To avoid introducing the order:
- Use a scheduler-private TDP flag.
- Register an unconditional TDA_SCHED_PRIV for 4BSD.
When an AST needs to be scheduled, i.e. the current thread must do
context switch in the return to userspace path, set the flag.
Then the ast handler calls ast_scheduler(), which gives the same
effect as scheduling TDA_AST.
The overhead is a single function call on each userspace return, for
4BSD case.
Reported and tested by: pho (previous version)
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54945
Diffstat (limited to 'sbin/fsck_ffs/ssh:/anongit@git.FreeBSD.org/(public-mirror)')
0 files changed, 0 insertions, 0 deletions
