Re: [PATCH] PM: domains: Shrink locking area of the gpd_list_lock
From: Stephen Boyd <hidden>
Date: 2021-06-24 20:34:02
Also in:
lkml
Quoting Ulf Hansson (2021-06-23 02:55:24)
On Wed, 23 Jun 2021 at 10:31, Stephen Boyd [off-list ref] wrote:quoted
lock as far down as possible to fix the problem, which is holding it over the calls into OPP.Yes, we don't want that.quoted
If I've read the code correctly it serves no purpose to grab the gpd_list_lock here in genpd_add_provider() because we grab the of_genpd_mutex and that is protecting the of_genpd_providers list everywhere else. Is that right? Put another way, This hunk of the patch can be dropped and then your concern will be addressed and there isn't anything more to do.It certainly can be dropped from the $subject patch, please re-spin to update that. However, there are additional changes that deserve to be done to improve the behaviour around the locks. More precisely, the &gpd_list_lock and the &of_genpd_mutex should be completely decoupled, but there are some other related things as well. Probably it's easier if I post a patch, on top of yours, to try to further improve the behavior. I would appreciate it if you could help with the test/review then.
Sure no problem. I've sent v2 with this hunk dropped. I can test your followup.