Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2007 14:00:06 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Johan Bucht <jbucht@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: kthread vs kproc
Message-ID:  <471A6C56.7010903@elischer.org>
In-Reply-To: <947010c30710201200t40f1d2eyef9cfa02e1cba12f@mail.gmail.com>
References:  <947010c30710201200t40f1d2eyef9cfa02e1cba12f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?471A6C56.7010903>