lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 14 Jul 2021 23:22:24 +0200
From:   Bean Huo <huobean@...il.com>
To:     Bart Van Assche <bvanassche@....org>,
        Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org,
        linux-scsi@...r.kernel.org
Cc:     Stanley Chu <stanley.chu@...iatek.com>,
        Can Guo <cang@...eaurora.org>, Bean Huo <beanhuo@...ron.com>,
        Asutosh Das <asutoshd@...eaurora.org>
Subject: Re: [PATCH] scsi: ufs: add missing host_lock in setup_xfer_req

On Wed, 2021-07-14 at 11:09 -0700, Bart Van Assche wrote:
> On 7/13/21 12:45 PM, Bean Huo wrote:
> 
> > This change only impacts on the Samsung exynos platform. and Can's
> > optimization patch is to optimise the host_lock,, and removed
> > host_lock, now add back in this function makes sense to me.
> > but I am thinking how about hba->host_sem?
> 
> 
> Hi Bean,
> 
> 
> 
> Calls of exynos_ufs_specify_nexus_t_xfer_req() must be serialized,
> hence 
> 
> Jaegeuks' patch. This function is called from the I/O submission path
> so 
> 
> performance matters. My understanding is that spinlocks have less 
> 
> overhead than semaphores. Hence the choice for a spinlock.
> 
> 
> 
> Thanks,

> 
Bart,

After adding spin_lock/unlock_irqsave()
in ufshcd_vops_setup_xfer_req(), there will be 4 times of call of
host_lock lock/unlock in ufshcd_send_command(). Reduce the code scope
of protection, but increase the number of calls to
spin_lock/unlock_irqsave().  Almost each sub-funciton
in ufshcd_send_command() calls spin_lock/unlock_irqsave(). why not
directly take spin_lock/unlock_irqsave() away from each sub-fun, and
increase the scope in ufshcd_send_command()?

Bean







> Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ