public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Suggest TASK_KILLABLE state to overcome most D state trouble
@ 2001-09-27 18:24 Jan Hudec
  2001-09-27 21:00 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Hudec @ 2001-09-27 18:24 UTC (permalink / raw)
  To: linux-kernel

Hello,

I am develpoing a network filesystem and I come across the problem with
noninteruptible waiting (the same as with NFS). Unfortunately there are
some cases, where waiting interuptibly and returning ERESTARTSYS is
difficult to imposible to do (when upcall is done, it must be remembered,
for the restarted syscall, but the syscall may not get restarted).

I can see 2 ways out for most cases.

The simpler one: add a TASK_KILLABLE state, that would be between INTERUPTIBLE
and NONINTERUPTIBLE. It could be interupted only with SIGKILL (I first thought
SIGSTOP too but that one shouldn't matter). In that case the syscall knows
it's canceled. I think most waiting in D state can be changed to be killable.
Mainly when handling page-fault (which may wait on network, that is even
indefinitely in case of failure). It won't make the system behave very nicely
in case of network failure, but would at least allow killing locked processes.

The more complicated would be to change the signal handling to allow hook
to be called when the syscall won't be restarted so the driver could
get rid of now invalid state information.

Does a patch adding a TASK_KILLABLE state have a chance to get in (in 2.5)?
Or can anybody thik of more elegant solution?

--------------------------------------------------------------------------------
                  				- Jan Hudec `Bulb' <bulb@ucw.cz>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-01 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-27 18:24 Suggest TASK_KILLABLE state to overcome most D state trouble Jan Hudec
2001-09-27 21:00 ` David Woodhouse
2001-10-01 11:32   ` Jan Hudec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox