Re: kthread vs kproc

From: Julian Elischer <julian_at_elischer.org>
Date: Sat, 20 Oct 2007 14:00:06 -0700
Johan Bucht wrote:
> Excellent, I was planning on prodding someone about this a while back,
> hope this will give some measurable performance improvements without
> sacrificing stability.
> How much will this affect debuggability, will there be a higher chance
> of thrashed call stacks and thus non-valid panic traces?
> 
> Feels a bit strange that some callers expect a process when calling a
> function that says it creates a thread, but I guess it's a bit late to
> complain that noone made a kproc macro for aio et al.
> What does aio actually need that requires it to run as a process?

Aio actually needs to hook the user's address space into its own (it 
adds itself as a second user of the calling procesess's address space)
so it can do the IO easily.

As such it needs a separate process so that it can have an address space to 
do it with.

My suggested work-around is to make the AIO an invisible kernel thread attached 
to the process that does the IO. that way it automatically has the 
right address space to work on.



> 
> /Johan
Received on Sun Oct 21 2007 - 15:59:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:20 UTC