Re: sema replacement

看板DFBSD_kernel作者時間21年前 (2005/02/09 07:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
:FreeBSD's new ATA code makes use of kernel counting semaphores (sema(9)) :in the queuing code which don't seem to exist in DragonFly*. I think the :serializing tokens are the replacement and wanted to see if a) that was :the right approach and if so, b) do you use lockmgr or is it preferable :to use the tokens directly. TIA : :* though, there does seem to be a private implementation in ffs_softdep.c : :-- :Chuck Tuffli :Agilent Technologies I would say we want to use tokens for now. The ATA driver core should be mostly non-blocking, at least presuming that sos hasn't added mallocs in the middle of the code (like existed in the original 4.x driver). This makes the token model a better fit. I won't even ask why they are using yet another (this is like the 8th or 9th now) locking API. Semaphores don't really fit the model for the type of locking they need. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #122KIo00 (DFBSD_kernel)
文章代碼(AID): #122KIo00 (DFBSD_kernel)