81 struct user_struct * alloc_uid(uid_t uid)
82 {
83 struct list_head *hashent = uidhashentry(uid);
84 struct user_struct *up;
85
86 spin_lock(&uidhash_lock);
87 up = uid_hash_find(uid, hashent);
88 spin_unlock(&uidhash_lock);
The code uses a hash table with multiple chains to reduce search time but then
uses a single lock for the whole table??
Suggest one lock per chain for better concurrency so code mod would be
spin_lock(&uidhash_lock[hashent])
Bob Cook
---------------------------------------------
This message was sent using GSWeb Mail Services.
http://www.gasou.edu/gsumail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/