Re: [PATCH 3/3] smp/ipi:Remove check around csd lock in handler forsmp_call_function variants

From: Preeti U Murthy
Date: Sun Jul 07 2013 - 12:26:52 EST


Hi Wang,

On 07/06/2013 07:51 PM, Wang YanQing wrote:
> On Sat, Jul 06, 2013 at 01:36:27PM +0530, Preeti U Murthy wrote:
>> Ideally it should be under a WARN_ON(). csd_unlock() has that WARN_ON().
>> Unlocking a parameter which is not locked should be seen as a bug, which
>> the above code is not doing. In fact it avoids it being reported as a bug.
>
> Although I know what's your meaning, but just like the comment in code:
>
> "
> /*
> * Unlocked CSDs are valid through generic_exec_single():
> */

I don't understand this comment. All callers of generic_exec_single()
take the csd lock. So where is the scenario of csds being unlocked in
generic_exec_single() before the call to
arch_send_call_function_single_ipi() is made?
Rather what is the above comment trying to say?

> "
>
> If the csd don't come from generic_exec_single, then
> Unlocked CSDs maybe are not valid. So we check CSD_FLAG_LOCK
> to avoid trigger the WARN_ON in csd_unlock.
>
> Genric_exec_single's name imply it is a generic version,
> you know, maybe we will have "special" version.
>
> Thanks.
>

Regards
Preeti U Murthy

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