linux-mips
[Top] [All Lists]

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

To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Subject: Re: [PATCH 1/3] signal: avoid useless test in do_signal()
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 9 Feb 2007 16:21:18 +0000
Cc: linux-mips@linux-mips.org, anemo@mba.ocn.ne.jp, Franck Bui-Huu <fbuihuu@gmail.com>
In-reply-to: <11710336594091-git-send-email-fbuihuu@gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1171033658561-git-send-email-fbuihuu@gmail.com> <11710336594091-git-send-email-fbuihuu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.2i
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.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>