Re: [PATCH] Fast path context switch - microoptimize FPU reload

From: Manfred Spraul (manfred@colorfullife.com)
Date: Sun Mar 09 2003 - 12:15:09 EST


Andi wrote:

>We don't need the lock prefix to test our local thread flags state.
>Unfortunately test_thread_flag currently always uses test_bit which
>has a LOCK on SMP, but that's unnecessary. LOCK is costly on P4,
>so it's a good idea to avoid it.
>
>

No, LOCK is required: the TIF_ flags word is also used for signal
delivery - writing without lock could corrupt state.

What about moving TIF_USEDFPU from the thread_info into
task_struct->flags? This flag word is only accessed by "current", no
special atomicity requirements.

--
    Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:18 EST