From: Adrian Hunter <adrian.hunter@intel.com>
To: Kiwoong Kim <kwmad.kim@samsung.com>,
'Avri Altman' <Avri.Altman@wdc.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
alim.akhtar@samsung.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, beanhuo@micron.com,
cang@codeaurora.org, sc.suh@samsung.com, hy50.seo@samsung.com,
sh425.lee@samsung.com, bhoon95.kim@samsung.com,
vkumar.1997@samsung.com
Subject: Re: [PATCH v1] scsi: ufs: remove clk_scaling_lock when clkscaling isn't supported.
Date: Mon, 14 Feb 2022 16:31:28 +0200 [thread overview]
Message-ID: <366a3afc-071f-ae77-d06d-25ad750976dc@intel.com> (raw)
In-Reply-To: <000001d81fcb$3b962f30$b2c28d90$@samsung.com>
On 12/02/2022 06:44, Kiwoong Kim wrote:
>> The error handler really should have exclusive access. One of the places
>> you change does explain that:
>>
>> * Hold the scaling lock just in case dev cmds
>> * are sent via bsg and/or sysfs.
>> */
>> - down_write(&hba->clk_scaling_lock);
>> + if (ufshcd_is_clkscaling_supported(hba))
>> + down_write(&hba->clk_scaling_lock);
>
>
> Yeah.., I saw the comment but didn't get why.
>
> Is there anyone who knows why it's necessary for all SoCs?
> At lease, I know there is no reason to forbid concurrent executions of dev cmd and power mode change.
>
> If there's nothing, how about adding a quick to ignore it?
Is it worth it?
The error handler really should have exclusive access.
Have you considered, for example, races of ufshcd_reset_and restore() and dev commands, tm commands, UIC commands.
I suspect more locking is needed not less.
next prev parent reply other threads:[~2022-02-14 14:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220205074128epcas2p40901c37a7328e825d8697f8d3269edba@epcas2p4.samsung.com>
2022-02-05 7:39 ` [PATCH v1] scsi: ufs: remove clk_scaling_lock when clkscaling isn't supported Kiwoong Kim
2022-02-06 8:20 ` Avri Altman
2022-02-11 2:15 ` Kiwoong Kim
2022-02-11 12:15 ` Adrian Hunter
2022-02-12 4:44 ` Kiwoong Kim
2022-02-14 14:31 ` Adrian Hunter [this message]
2022-02-15 11:00 ` Bean Huo
2022-02-15 17:09 ` Bart Van Assche
2022-02-17 8:12 ` Kiwoong Kim
2022-02-11 12:19 ` Avri Altman
2022-02-14 19:29 ` Bart Van Assche
2022-02-15 6:03 ` Kiwoong Kim
2022-02-15 17:15 ` Bart Van Assche
2022-02-17 8:15 ` Kiwoong Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=366a3afc-071f-ae77-d06d-25ad750976dc@intel.com \
--to=adrian.hunter@intel.com \
--cc=Avri.Altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=beanhuo@micron.com \
--cc=bhoon95.kim@samsung.com \
--cc=cang@codeaurora.org \
--cc=hy50.seo@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=kwmad.kim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sc.suh@samsung.com \
--cc=sh425.lee@samsung.com \
--cc=vkumar.1997@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).