All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm:  dm_table_unplug_all optimization
@ 2008-04-08 18:20 Mike Anderson
  2008-04-08 18:21 ` Mike Anderson
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Anderson @ 2008-04-08 18:20 UTC (permalink / raw)
  To: dm-devel; +Cc: Jens Axboe

This patch series provides a optimization to the dm_table_unplug_all
function in device mapper (dm).

A OLTP type workload on a 16core Intel box using a volume containing 48 logical
drives across 3 dual port fiber adapters showed some high oprofile values.

A high oprofile sampling value was seen in dm_table_unplug_all coming from
high contention of the q->queue_lock. Since dm_table_unplug_all will unplug all
devices in the table it can cause contention on the queue_lock with processes
trying to pull requests off the queue even on devices that are not plugged. As
dm_table_unplug_all is coded now blk_unplug will result in the queue_lock being taken for all checks of the queue_flags (blk_remove_plug).

The change lead to a ~16 percent performance improvement on a RedHat
distro kernel. It appears to be a fairly safe change as the worst case if
dm missed a queue to unplug, the queue will get unplugged when the number
of requests exceed (unplug_thresh (4) or unplug_delay (3 ms). It can also
be the case that if post getting the queue_lock and checking for the queue
to be plugged that once the lock is dropped plugging can occur.

-andmike
--
Michael Anderson
andmike@linux.vnet.ibm.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-09  8:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-08 18:20 [PATCH] dm: dm_table_unplug_all optimization Mike Anderson
2008-04-08 18:21 ` Mike Anderson
2008-04-09  8:15   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.