I'm creating this bugzilla to track the integration of the patch into RHEL 5. Mike Anderson was doing an OLTP benchmark on a computer with 48 physical disks mapped to one logical device via device mapper. He found that there was a slowdown on request_queue->lock in function generic_unplug_device. The slowdown is caused by the fact that when some code calls unplug on the device mapper, device mapper calls unplug on all physical disks. These unplug calls take the spinlock, find that the queue is already unplugged, release the spinlock and exit. The test for already unplugged queue can be moved out of the spinlock. When it was done, there was 18% performance improvement on the whole benchmark.
Created attachment 314574 [details] a patch for the problem A patch for the problem. Test for already unplugged queue outside the spinlock.
in kernel-2.6.18-110.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-0225.html