[lkml]   [2007]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 06/11] syslets: core, documentation
On Wed, 14 Feb 2007, Benjamin LaHaise wrote:

> On Wed, Feb 14, 2007 at 03:17:59PM -0800, Davide Libenzi wrote:
> > > That's an incorrect assumption. Every task/thread in the system has FPU
> > > state associated with it, in part due to the fact that glibc has to change
> > > some of the rounding mode bits, making them different than the default from
> > > a freshly initialized state.
> >
> > IMO I still belive this is not a huge problem. FPU state propagation/copy
> > can be done in a clever way, once we detect the in-async condition.
> Show me. clts() and stts() are expensive hardware operations which there
> is no means of avoiding as control register writes impact the CPU in a not
> trivial manner. I've spent far too much time staring at profiles of what
> goes on in the context switch code in the process of looking for optimizations
> on this very issue to be ignored on this point.

The trivial case is the cachehit case. Everything flows like usual since
we don't swap threads.
If we're going to sleep, __async_schedule has to save/copy (depending if
TS_USEDFPU is set) the current FPU state to the newly selected service
thread (return-to-userspace thread).
When a fault eventually happen in the new userspace thread, context is

- Davide

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-02-15 01:39    [W:0.130 / U:1.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site