Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2002 20:41:30 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        smp@FreeBSD.ORG, dillon@FreeBSD.ORG, jhb@FreeBSD.ORG, Chad David <davidc@acns.ab.ca>
Subject:   Re: select/poll locking wrong?
Message-ID:  <200203010441.g214fUT41077@apollo.backplane.com>
References:  <20020227111605.GH80761@elvis.mu.org> <20020227122606.A15980@colnta.acns.ab.ca> <20020227193059.GP80761@elvis.mu.org> <20020227124514.A27497@colnta.acns.ab.ca> <20020227202205.GT80761@elvis.mu.org> <20020227235736.A28776@colnta.acns.ab.ca> <20020228073743.GD80761@elvis.mu.org> <20020228011644.A28982@colnta.acns.ab.ca> <20020228095037.GJ80761@elvis.mu.org> <200203010337.g213bQv40727@apollo.backplane.com> <20020301040603.GE77980@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
:> 
:>     The cache appears to be there so select(), when it is getting ready
:>     to return, can avoid traversing the list and removing the events that
:>     have not occured.  This results in a potentially stale si_pid because
:>     now the process can exit without doing any further cleanups.
:
:Yes, this is why we must now walk the list when leaving select/poll.
:
:..
:Anyhow, hope that clarifies.  Any other ideas or improvements?
:
:Any idea on how we can avoid the list traversal at the end of
:select?
:
:-- 
:-Alfred Perlstein [alfred@freebsd.org]

    Walking the whole list is one solution.  Another would be to link
    selinfo into a thread-based list (the thread it has been asigned to)
    and just walk *that* list on exit in order to avoid having to lock
    the entire descriptor list on every select().  I'm still not sure
    which of these two approaches you are going for.

    I'm not sure how this would tie into KSE.  It might not be efficient
    to walk the list on thread-exit since KSE creates and drops threads
    all the time.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




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