help-hurd
[Top][All Lists]
Advanced

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

Re: passive translator timeout


From: Yaakov Nemoy
Subject: Re: passive translator timeout
Date: Fri, 1 Oct 2004 14:10:31 -0400

On Thu, 30 Sep 2004 14:21:37 +0200, Marcus Brinkmann
<marcus.brinkmann@ruhr-uni-bochum.de> wrote:
> 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
> 
That clears alot up.  I think hotplugging might work better in any
case, though I was thinking of setting the timeouts (myself, it
wouldn't be a default in any case) to something on the order of 5
seconds.




reply via email to

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