git: kernel - Refactor kqueue interlocks

看板DFBSD_commit作者時間15年前 (2010/09/07 10:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 4371bb25c4dc6be21df04e7de72b65682ca9f4c4 Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Sep 6 18:44:03 2010 -0700 kernel - Refactor kqueue interlocks * Make KN_PROCESSING a soft lock flag. When set nobody else can mess with a particular knote (other than setting certain flags) even if the originator blocks. * Interlock major processing with KN_PROCESSING. Registration, event scan, knote(), deletion, and filter ops. * Block & restart when conflicts occur. For the knote() hot-path we only block and restart if the 'hint' is non-zero, otherwise we just flag with KN_REPROCESS to indicate that reprocessing is required. * This should fix kqueue races related to blocking operations confusing the list scan. * Document the shit out of everything. Reported-by: Francois Tigeot <ftigeot@wolfpond.org> Summary of changes: sys/kern/kern_event.c | 344 +++++++++++++++++++++++++++++++++++-------------- sys/sys/event.h | 18 ++- 2 files changed, 255 insertions(+), 107 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4371bb25c4dc6be21df04e7de72b65682ca9f4c4 -- DragonFly BSD source repository
文章代碼(AID): #1CXPpXaV (DFBSD_commit)