Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Dec 2000 10:52:48 -0800 (PST)
From:      Matt Dillon <dillon@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
Message-ID:  <200012131852.eBDIqm584821@earth.backplane.com>
References:  <200012131003.eBDA3rh34394@freefall.freebsd.org> <20001213024954.B16205@fw.wintelcom.net> <vm4s088s2l.wl@rina.r.dl.itc.u-tokyo.ac.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
: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 <tanimura@r.dl.itc.u-tokyo.ac.jp> <tanimura@FreeBSD.org>

    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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012131852.eBDIqm584821>