git: fq - fix a (possible) deadlock

看板DFBSD_commit作者時間14年前 (2011/10/22 18:02), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 009da86a5800b6fefcda0a946ab02a089bd9254f Author: Alex Hornung <ahornung@gmail.com> Date: Fri Aug 26 00:29:17 2011 +0000 fq - fix a (possible) deadlock * A deadlock can occur if a lock is held around the strategy call when the completion is synchronous and ends up in the destruction of a tdio, as both will acquire the same diskctx lock. * Refactor the code around strategy calls so that the bios are first prepared, under the protection of the lock, and inserted into a local array. Once that is ready and the bios are ready and taken out of their respective queues, the locks are dropped and the strategy call occurs locklessly. Reported-by: Antonio Huete (tuxillo@) Summary of changes: sys/kern/dsched/fq/fq.h | 7 +++++++ sys/kern/dsched/fq/fq_core.c | 39 +++++++++++++++++++++++++++++++++++---- sys/kern/dsched/fq/fq_diskops.c | 25 +++++++++++++++++++++++-- 3 files changed, 65 insertions(+), 6 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/009da86a5800b6fefcda0a946ab02a089bd9254f -- DragonFly BSD source repository
文章代碼(AID): #1EefIzxP (DFBSD_commit)