Date: Sat, 14 Sep 2002 17:42:25 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Bruce Evans <bde@zeta.org.au>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern vfs_bio.c src/sys/sys bio.h Message-ID: <200209150042.g8F0gPF8053917@apollo.backplane.com> References: <56929.1032030798@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
:> :> Well, the buffer is owned at the time of the BIO_DONE and you have :> a lock structure sitting right there, why not simply use the :> lock structure's interlock? Note I said 'interlock' here, not the :> main lock. : :struct bio != struct buf : :-- :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 Well, so? struct bio has access to struct buf via _bio_buf. Another alternative would be to use a pool mutex, e.g. mtx_pool_lock(bio), mtx_pool_unlock(bio). Another alternative would be to add a mutex pointer field to the bio that the device can assign, allowing the device to use a mutex that it already needs to use anyway (again to reduce the L1 cache impact). The buf's lockmgr lock's interlock would also probably have less impact on the L1 cache then (another) random pool lock. I do not think a timeout is a good solution. -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209150042.g8F0gPF8053917>