[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160926162831.GB6782@redhat.com>
Date: Mon, 26 Sep 2016 18:28:31 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Waiman Long <Waiman.Long@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Stas Sergeev <stsp@...t.ru>, linux-kernel@...r.kernel.org,
Scott J Norton <scott.norton@....com>,
Douglas Hatch <doug.hatch@....com>
Subject: Re: [PATCH v2] signals: Avoid unnecessary taking of sighand->siglock
On 09/23, Waiman Long wrote:
>
>
> + /*
> + * In case the signal mask hasn't changed, we won't need to take
> + * the lock. The current blocked mask can be modified by other CPUs.
> + * To be safe, we need to do an atomic read without lock. As a result,
> + * this check will only be done on 64-bit architectures.
> + */
> + if ((_NSIG_WORDS == 1) &&
> + (READ_ONCE(tsk->blocked.sig[0]) == newset->sig[0]))
> + return;
so in case you missed my reply to V1, I still think that the comment is wrong
and you should drop the _NSIG_WORDS check.
Oleg.
Powered by blists - more mailing lists