Switch busy loops from using msleep(1) to cpu_relax().
Any improvement is negligible given the rare nature of these busy wait
conditions -- but cpu_relax() is considered the more polite method to
use for busy loops.
/*
* This conflicting I/O is extremely improbable in the caller,
- * so msleep(1) is sufficient and there is no need for a wait queue.
+ * so cpu_relax() is sufficient and there is no need for a wait queue.
*/
static void __check_for_conflicting_io(struct dm_snapshot *s, chunk_t chunk)
{
while (__chunk_is_tracked(s, chunk))
- msleep(1);
+ cpu_relax();
}