Re: [PATCH 1/3] signal: avoid useless test in do_signal()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/9/07, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
Ralf Baechle wrote:
On Fri, Feb 09, 2007 at 04:07:36PM +0100, Franck Bui-Huu wrote:

-			if (test_thread_flag(TIF_RESTORE_SIGMASK))
-				clear_thread_flag(TIF_RESTORE_SIGMASK);

This is a microoptimization.  The assumption here is TIF_RESTORE_SIGMASK
will rarely need to be cleared and atomic operations are somewhat
expensive if as in this case we have to assume the cacheline isn't
held exclusive yet.


I missed that. You can forget this patch or maybe something like this
is more appropriate ?

	if (unlikely(test_thread_flag(TIF_RESTORE_SIGMASK)))
		clear_thread_flag(TIF_RESTORE_SIGMASK);
--
              Franck


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux