Re: [PATCH 1/1] mlock: split the shmlock_user_lock spinlock into per user_struct spinlock

Rik van Riel
2012-05-03T21:20:56Z

On 05/03/2012 02:07 PM, Rik van Riel wrote:
> On 05/03/2012 01:34 PM, rajman mekaco wrote:
>> The user_shm_lock and user_shm_unlock functions use a single global
>> spinlock for protecting the user->locked_shm.
>>
>> This is an overhead for multiple CPUs calling this code even if they
>> are having different user_struct.
>>
>> Remove the global shmlock_user_lock and introduce and use a new
>> spinlock inside of the user_struct structure.
>>
>> Signed-off-by: rajman mekaco<rajman.mekaco@gmail.com>
>
> Reviewed-by: Rik van Riel <riel@redhat.com>

Hold this ... while the patch is correct, Peter raised
a valid concern about its usefulness, which should be
sorted out first.