Re: [linux-usb-devel] [PATCH 1/9] USB usbfs: take a reference to the usb device

From: Oliver Neukum
Date: Sat Apr 17 2004 - 15:33:59 EST



> riddled with races of this kind. The simplest solution is to
> systematically take ps->dev->serialize when entering the usbfs routines,
> which is what my patches do. This should be regarded as a first step: it

What is the alternative?

> gives correctness, but at the cost of a probable performance hit. In later
> steps we can (1) turn dev->serialize into a rwsem

Rwsems are _slower_ in the normal case of no contention.

> (2) push the acquisition of dev->serialize down to the lower levels as they
> are fixed up.

Why?

Regards
Oliver

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