Restore important comment in RCU/EPOCH support in FreeBSD after r355784.
Sponsored by: Mellanox Technologies
This commit is contained in:
parent
359a5f96a1
commit
cc79ea3a26
@ -259,6 +259,15 @@ linux_synchronize_rcu_cb(ck_epoch_t *epoch __unused, ck_epoch_record_t *epoch_re
|
||||
sched_prio(td, prio);
|
||||
/* task switch */
|
||||
mi_switch(SW_VOL | SWT_RELINQUISH);
|
||||
/*
|
||||
* It is important the thread lock is dropped
|
||||
* while yielding to allow other threads to
|
||||
* acquire the lock pointed to by
|
||||
* TDQ_LOCKPTR(td). Currently mi_switch() will
|
||||
* unlock the thread lock before
|
||||
* returning. Else a deadlock like situation
|
||||
* might happen.
|
||||
*/
|
||||
thread_lock(td);
|
||||
}
|
||||
} else {
|
||||
|
@ -578,6 +578,13 @@ epoch_block_handler_preempt(struct ck_epoch *global __unused,
|
||||
*/
|
||||
counter_u64_add(switch_count, 1);
|
||||
mi_switch(SW_VOL | SWT_RELINQUISH);
|
||||
/*
|
||||
* It is important the thread lock is dropped while yielding
|
||||
* to allow other threads to acquire the lock pointed to by
|
||||
* TDQ_LOCKPTR(td). Currently mi_switch() will unlock the
|
||||
* thread lock before returning. Else a deadlock like
|
||||
* situation might happen.
|
||||
*/
|
||||
thread_lock(td);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user