From: Horst von Brand <vonbrand@inf.utfsm.cl>
To: Chris Friesen <cfriesen@nortel.com>
Cc: Horst von Brand <vonbrand@inf.utfsm.cl>,
Anthony DiSante <theant@nodivisions.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: uninterruptible sleep lockups
Date: Tue, 22 Feb 2005 22:05:35 -0300 [thread overview]
Message-ID: <200502230105.j1N15e56005773@laptop11.inf.utfsm.cl> (raw)
In-Reply-To: <421B9C86.8090800@nortel.com>
Chris Friesen <cfriesen@nortel.com> said:
> Horst von Brand wrote:
> > Anthony DiSante <theant@nodivisions.com> said:
> >>That's one of the things I asked a few messages ago. Some people on
> >>the list were saying that it'd be "really hard" and would "require a
> >>lot of bookkeeping" to "fix" permanently-D-stated processes... which is
> >>completely different than "impossible."
> > Most people here have little clue. It can't be done.
> I realize it would be extremely difficult if not impossible to do in the
> current linux architecture, but I find it hard to believe that it is
> technically impossible if one were allowed to design the system from
> scratch.
It is hard (if not impossible) to find out /what/ is broken (and how) and
fix it automatically. As you were told, D means the process is waiting for
some event. That event /might/ happen sometime (waiting for slow hardware)
or never (kernel programming error, hardware forgot the operation in
progress, ...). So you might fake it out by making believe the event did
happen. What if was just delayed, and /does/ then happen with nobody
waiting?
Any such is just papering over the problems, and is /massive/ complexity
for no real gain.
> Maybe I'm on crack, but would it not be technically possible to have all
> resource usage be tracked so that when a task tries to do something and
> hangs, eventually it gets cleaned up?
Sure. But there is /no way/ to know if the task will ever do something
(Turing's undecibility sees to that, even with perfect hardware), so the
only chance is to wait and see if the task releases it by itself. If you
just want to axe the task, you'd have to know beforehand what it will do
(and do it for the task on killing it). But the /task/ couldn't do it, what
guarantees the cleanup can?
> We already handle cleaning up stuff for userspace (memory, file
> descriptors, sockets, etc.).
On process end, i.e., when we know the stuff won't be used anymore. If the
program is stuck, kill it and go as before. If it doesn't go away cleanly,
something is /seriously/ wrong... and it is anybody's guess what.
> Why not enforce a design that says "all
> entities taking a lock must specify a maximum hold time".
It is hard enough to program without such restrictions. This would
incidentally also mean that the kernel has to be hard real time,
always. The usual PC hardware just isn't up to that, for starters.
And what would you do if you have nested locks, and the outer one times
out? Must kill the inner one beforehand... more complexity still.
> After that
> time expires, they are assumed to be hung, and all their resources
> (which were being tracked by some system) get cleaned up.
> It would probably be complicated, slow, and generally not worth the
> effort. But it seems at least technically possible.
If the system takes all extant resources for managing said resources, it is
somewhat pointless...
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
next prev parent reply other threads:[~2005-02-23 3:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-21 19:18 Anthony DiSante
2005-02-21 19:45 ` Valdis.Kletnieks
2005-02-21 20:24 ` Anthony DiSante
2005-02-21 20:54 ` Valdis.Kletnieks
2005-02-21 22:18 ` Anthony DiSante
2005-02-21 22:43 ` Chris Friesen
2005-02-22 0:06 ` Anthony DiSante
2005-02-22 0:36 ` Valdis.Kletnieks
2005-02-21 22:44 ` Anthony DiSante
2005-02-21 23:11 ` Nish Aravamudan
[not found] ` <421B12DB.70603@aitel.hist.no>
2005-02-22 11:16 ` Anthony DiSante
2005-02-22 12:26 ` Denis Vlasenko
2005-02-22 12:35 ` Anthony DiSante
2005-02-22 13:47 ` linux-os
2005-02-22 20:03 ` Anthony DiSante
2005-02-22 20:16 ` Chris Friesen
2005-02-22 20:29 ` Anthony DiSante
2005-02-22 20:24 ` Horst von Brand
2005-02-22 20:56 ` Chris Friesen
2005-02-22 21:40 ` linux-os
2005-02-22 23:17 ` Chris Friesen
2005-02-22 23:42 ` linux-os
2005-02-23 0:25 ` Chris Friesen
2005-02-23 1:05 ` Horst von Brand [this message]
2005-02-23 10:04 ` Bernd Petrovitsch
2005-02-22 21:31 ` Olaf Titz
2005-02-23 16:34 ` Nish Aravamudan
[not found] <fa.duv6ag6.p5mth0@ifi.uio.no>
[not found] ` <fa.irk349q.1c3si2o@ifi.uio.no>
2005-02-23 0:59 ` Bodo Eggert
2005-02-23 13:50 ` linux-os
2005-02-24 2:05 ` Bodo Eggert
2005-02-23 16:55 Parag Warudkar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502230105.j1N15e56005773@laptop11.inf.utfsm.cl \
--to=vonbrand@inf.utfsm.cl \
--cc=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=theant@nodivisions.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®