help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: passive translator timeout


From: Marcus Brinkmann
Subject: Re: passive translator timeout
Date: Thu, 30 Sep 2004 14:21:37 +0200
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Sun, 15 Aug 2004 16:45:27 -0700 (PDT),
Yaakov <loupgarourouge@yahoo.com> wrote:
> Is there a way to set a translator to "time-out" or unload itself when

Yes.  In fact, the code is already there.  The problem is, it doesn't
work, for several reasons.

The relevant interface is
hurd/libports/port.h::ports_manage_port_operations_multithread() and
its thread and server timeout interface.  It's already used for
example by diskfs based filesystems like isofs, see
hurd/libdiskfs/init-first.c::master_thread_function()
(and the static variables thread_timeout, server_timeout in that file).

Now, why doesn't it work?  Well, if you look at
hurd/libports/manage-multithread.c::ports_manage_port_operations_multithread()
at the end of it, both timeouts are overridden and set to 0.  But this
is just to avoid hitting the bugs and problems.

First issue is that thread timeout isn't currently very useful:
libcthread can not return resources used for thread allocation back to
the system.  They can only be reused for new threads.  Well, that's
not too bad, but even that is probably defunct (who knows?  it's a
long time anybody ever bothered to test and check that).

The second issue is that because no timeout is the state of affair,
the whole timeout code is untested and might have bugs.  In fact,
because there are sometimes several servers running in one server
process (pager, etc), there is a certain complexity involved, and
although there is code to deal with that complexity, it's mostly
untested for the above reasons.  So, I would expect problems to crop
up even if the above is fixed.

> it won't start up until i do cd /cdrom (and even cd /cdrom/debian which
> is nice compared to how /other/ OSes won't mount a network share to see
> if a directory exists until i give it an explicit directive), but even
> when i then cd out, i can't eject the CD without entering:
> settrans /cdrom -g
> is there an easy way to allow me to eject a cdrom when not in use and
> retain the passive translator?

Well, timeouts are usually in the range of minutes, and that wouldn't
help you in this case.  For real usability, you'd want some kind of
notification come from the drive that the eject button was pressed.
This is currently not covered at all, neither in code nor in design.

It's evident that such a notification system is a requirement for a
modern driver framework, for example for hot plugging.

Thanks,
Marcus





reply via email to

[Prev in Thread] Current Thread [Next in Thread]