Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1429756
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update |
| Date | 2016-06-23 14:30 +0200 |
| Message-ID | <rNbVE-1sW-19@gated-at.bofh.it> (permalink) |
| References | <rMGoO-5UW-9@gated-at.bofh.it> <rMIAh-7xZ-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jun 22, 2016 at 7:06 AM, Eduardo Valentin <edubezval@gmail.com> wrote: > Because several drivers do the following pattern: > .set_mode() > ... > local_data->mode = new_mode; > thermal_zone_device_update(tz); > > makes sense to simply do the thermal_zone_device_update() > in thermal core, after setting the new mode. > > Also, this patch also remove deadlocks on drivers that > call thermal_zone_device_update() on .set_mode(), > as .set_mode() is now called always with tz->lock held. To me, this part of the patch is way more important than the optimization mentioned before. Apparently, the problem is that drivers deadlock, because the thermal_zone_device_update() invoked from ->set_mode() is called under tz->lock. So to address that problem you make the core call thermal_zone_device_update() after ->set_mode() outside of tz->lock and the drivers don't have to do it any more. Is that correct? Thanks, Rafael
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 02/15] thermal: sysfs: lock tz while on access to mode properties Zhang Rui <rui.zhang@intel.com> - 2016-06-22 04:50 +0200
[PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-06-22 07:10 +0200
Re: [PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update "Rafael J. Wysocki" <rafael@kernel.org> - 2016-06-23 14:30 +0200
Re: [PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update Keerthy <a0393675@ti.com> - 2016-06-23 14:40 +0200
Re: [PATCH 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-07-01 23:00 +0200
[PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-06-22 07:20 +0200
Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update Keerthy <a0393675@ti.com> - 2016-06-22 11:40 +0200
Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-06-22 16:40 +0200
Re: [PATCHv2 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-06-22 17:10 +0200
[PATCHv3 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-06-22 16:40 +0200
[PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-06-22 17:10 +0200
Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update Keerthy <a0393675@ti.com> - 2016-06-23 06:40 +0200
Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update Darren Hart <dvhart@infradead.org> - 2016-06-23 07:00 +0200
Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update "Peter Feuerer" <peter@piie.net> - 2016-07-03 11:10 +0200
Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update Zhang Rui <rui.zhang@intel.com> - 2016-06-29 08:30 +0200
Re: [PATCHv4 1/1] thermal: core: call thermal_zone_device_update() after mode update Eduardo Valentin <edubezval@gmail.com> - 2016-07-01 23:00 +0200
csiph-web