From: Bart Van Assche <bvanassche@acm.org>
To: Avri Altman <Avri.Altman@wdc.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR.
Date: Wed, 23 Oct 2024 12:44:22 -0700 [thread overview]
Message-ID: <b43d5e01-cafe-4133-9873-68897439bf5f@acm.org> (raw)
In-Reply-To: <DM6PR04MB65750DBFE520C0DDE075146EFC4D2@DM6PR04MB6575.namprd04.prod.outlook.com>
On 10/22/24 11:47 PM, Avri Altman wrote:
>> On 10/22/24 12:43 AM, Avri Altman wrote:
>>> for_each_set_bit(tag, &issued, hba->nutmrs) {
>>> struct request *req = hba->tmf_rqs[tag];
>>> struct completion *c = req->end_io_data;
>>
>> Would it be sufficient to hold the SCSI host lock around the
>> hba->outstanding_tasks read only? I don't think that the
>> for_each_set_bit() loop needs to be protected with the SCSI host lock.
>
> That may cause concurrent access to tmf_rqs?
Right, the host_lock serializes hba->tmf_rqs[] accesses. Without having
analyzed whether or not removing locking from around the hba->tmf_rqs[]
accesses, let's keep this locking.
> So better withdraw from changing ufshcd_tmc_handler() and just leave
> the whole function as it is?
That sounds good to me.
Thanks,
Bart.
next prev parent reply other threads:[~2024-10-23 19:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 7:43 [PATCH v2 0/3] Untie the host lock entanglement - part 1 Avri Altman
2024-10-22 7:43 ` [PATCH v2 1/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR Avri Altman
2024-10-22 16:51 ` Bart Van Assche
2024-10-23 6:47 ` Avri Altman
2024-10-23 19:44 ` Bart Van Assche [this message]
2024-10-22 7:43 ` [PATCH v2 2/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLCLR Avri Altman
2024-10-22 16:52 ` Bart Van Assche
2024-10-22 7:43 ` [PATCH v2 3/3] scsi: ufs: core: Remove redundant host_lock calls around UTRLCLR Avri Altman
2024-10-22 16:52 ` Bart Van Assche
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=b43d5e01-cafe-4133-9873-68897439bf5f@acm.org \
--to=bvanassche@acm.org \
--cc=Avri.Altman@wdc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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