lkml.org 
[lkml]   [2003]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fast path context switch - microoptimize FPU reload
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/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.033 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site