]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ACPI / osl: speedup grace period in acpi_os_map_cleanup
authorKonstantin Khlebnikov <koct9i@gmail.com>
Sun, 9 Nov 2014 09:53:37 +0000 (13:53 +0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 11 Nov 2014 20:44:58 +0000 (21:44 +0100)
commit74b51ee152b6d99e61ba329799a039453fb9438f
tree72af2fb275b014f71622ad45526d5e0d30b42188
parent206c5f60a3d902bc4b56dab2de3e88de5eb06108
ACPI / osl: speedup grace period in acpi_os_map_cleanup

ACPI maintains cache of ioremap regions to speed up operations and
access to them from irq context where ioremap() calls aren't allowed.
This code abuses synchronize_rcu() on unmap path for synchronization
with fast-path in acpi_os_read/write_memory which uses this cache.

Since v3.10 CPUs are allowed to enter idle state even if they have RCU
callbacks queued, see commit c0f4dfd4f90f1667d234d21f15153ea09a2eaa66
("rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks").
That change caused problems with nvidia proprietary driver which calls
acpi_os_map/unmap_generic_address several times during initialization.
Each unmap calls synchronize_rcu and adds significant delay. Totally
initialization is slowed for a couple of seconds and that is enough to
trigger timeout in hardware, gpu decides to "fell off the bus". Widely
spread workaround is reducing "rcu_idle_gp_delay" from 4 to 1 jiffy.

This patch replaces synchronize_rcu() with synchronize_rcu_expedited()
which is much faster.

Link: https://devtalk.nvidia.com/default/topic/567297/linux/linux-3-10-driver-crash/
Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Reported-and-tested-by: Alexander Monakov <amonakov@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/osl.c