public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* blk-mq vs cpu hotplug performance (due to percpu_ref_put performance)
@ 2014-10-28 19:35 Christian Borntraeger
  2014-10-28 20:00 ` Tejun Heo
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Borntraeger @ 2014-10-28 19:35 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kent Overstreet, Jens Axboe, Christoph Hellwig,
	linux-kernel@vger.kernel.org >> Linux Kernel Mailing List,
	linux-s390

Tejun,

when going from 3.17 to 3.18-rc2 cpu hotplug become horrible slow on some KVM guests on s390

I was able to bisect this to

commit 9eca80461a45177e456219a9cd944c27675d6512
("Revert "blk-mq, percpu_ref: implement a kludge for SCSI blk-mq stall during probe")

Seems that this is due to all the rcu grace periods on percpu_ref_put during the cpu hotplug notifiers.

This is barely noticable on small guests (lets say 1 virtio disk), but on guests with 20 disks a hotplug takes 2 or 3 instead of around 0.1 sec.
There are three things that make this especially noticably on s390:
- s390 has 100HZ which makes grace period waiting slower
- s390 does not yet implement context tracking which would speed up RCU
- s390 systems usually have a bigger amount of disk (e.g. 20 7GB disks instead of one 140GB disks)

Any idea how to improve the situation? I think we could accept an expedited variant on cpu hotplug, since stop_machine_run will cause hickups anyway, but there are probably other callers.


Christian

PS: on the plus side, this makes CPU hotplug races less likely.... 


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

end of thread, other threads:[~2014-11-04 21:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 19:35 blk-mq vs cpu hotplug performance (due to percpu_ref_put performance) Christian Borntraeger
2014-10-28 20:00 ` Tejun Heo
2014-10-28 20:20   ` Christian Borntraeger
2014-10-28 20:22     ` Tejun Heo
2014-10-28 20:26       ` Tejun Heo
2014-10-28 20:29       ` Christian Borntraeger
2014-10-28 20:30         ` Tejun Heo
2014-11-04 18:52           ` [PATCH block/for-linus] blk-mq: make mq_queue_reinit_notify() freeze queues in parallel Tejun Heo
2014-11-04 19:46             ` Christian Borntraeger
2014-11-04 21:48             ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox