From owner-cvs-all Wed Dec 13 10:53: 6 2000 From owner-cvs-all@FreeBSD.ORG Wed Dec 13 10:53:02 2000 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id 9EBD237B400; Wed, 13 Dec 2000 10:53:02 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id eBDIqm584821; Wed, 13 Dec 2000 10:52:48 -0800 (PST) (envelope-from dillon) Date: Wed, 13 Dec 2000 10:52:48 -0800 (PST) From: Matt Dillon Message-Id: <200012131852.eBDIqm584821@earth.backplane.com> To: bright@wintelcom.net Cc: tanimura@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, jhb@FreeBSD.ORG, cp@FreeBSD.ORG Subject: Re: cvs commit: src/sys/ufs/ffs ffs_vfsops.c References: <200012131003.eBDA3rh34394@freefall.freebsd.org> <20001213024954.B16205@fw.wintelcom.net> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Thus it should be even better to enter to and exit from the ufs hash :mutex in the functions shown above. : :Alfred> That maybe the code should be using wakeup_one() as well? I'm :Alfred> not sure how wakeup_one works with respect to FIFO or LIFO, :Alfred> if it's LIFO then this can cause problems because of lots of :Alfred> processes wedged on this getting stuck behind the newcomers. :Alfred> If it's FIFO we should be fine. : :A sleep queue is a TAILQ, which is FIFO. So wakeup_one() should work. : :-- :Seigo Tanimura I have one request here. In order for wakeup_one() to work, any waiting tasks *must* attempt to obtain the lock when they are woken up rather then (potentially) abort and do something else, or no other task will be woken up. I would like all instances where tasks wait here, or in the single instance if we are talking about a centralized locking routine, to document this requirement in a comment. We do not want to run up against the situation where some future programmer believes he can wait for a lock and then abort when he is woken up (e.g. if getting a signal) rather then actually obtain the lock. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message