Re: please revert kthread from loop.c

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

 



On Thu, 13 Jul 2006 08:36:02 -0500
"Serge E. Hallyn" <[email protected]> wrote:

> Quoting Andrew Morton ([email protected]):
> 
> > Again: why is this so hard?  It shouldn't be.  Perhaps because loop is
> > using completions in bizarre ways where it should be using
> > wake_up_process(), wait_event(), etc.
> 
> Ah.
> 
> wait_event() actually seems like the way to go - I'll try to follow the
> example in fs/ocfs2/journal.c.

I suspect quite a lot of changes to loop.c would fall out.  For a start, in
a sufficiently-simplified implementation lo_pending would perhaps go away -
just test the NULLness of the top of the list of BIOs.

> Still I'd also like to patch kthread to correctly handle an already
> exited thread.  Would that be acceptable, or is requiring the thread not
> to exit prematurely considered desirable?

That would seem sensible, but I don't immediately see how to do it
non-racily without changing the API or by adding a `struct completion' to
the task_struct.  Because the task might be exitting-but-not-exitted, and
still using resources which the kthread_stop() caller wants to release.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux