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

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

 



On 05/03/2012 03:31 PM, Peter Zijlstra wrote:
On Thu, 2012-05-03 at 23:04 +0530, rajman mekaco wrote:
The user_shm_lock and user_shm_unlock functions use a single global
spinlock for protecting the user->locked_shm.

Are you very sure its only protecting user state? This changelog doesn't
convince me you've gone through everything and found it good.

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.

While I don't immediately see anything wrong with it, I doubt its
useful. What workload run with enough users that this makes a difference
one way or another?

When running with containers and/or LXC, I believe that
each UID in each container gets its own user_struct, but
you do raise a good question - what user programs call
mlock anyway, and how often?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]