Re: [PATCH] char random: fix boot id uniqueness race (v2)

From: Eric Dumazet
Date: Wed Feb 15 2012 - 09:08:28 EST


Le mercredi 15 fÃvrier 2012 Ã 08:35 -0500, Mathieu Desnoyers a Ãcrit :

> That would make sense, as long as we're OK about turning a read-mostly
> operation into a fully serialized operation that requires to exchange
> the lock between processor cache-lines. But as you point out, it should
> be fairly unfrequently used.
>
> Any particular reason to use a spin lock rather than a mutex ? I did put
> a mutex in my implementation assuming that it would be a little more
> RT-friendly.

generate_random_uuid(uuid) is very fast and doesnt sleep.



--
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/