mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Avri Altman <Avri.Altman@wdc.com>
Cc: Daejun Park <daejun7.park@samsung.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>,
	"huobean@gmail.com" <huobean@gmail.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	ALIM AKHTAR <alim.akhtar@samsung.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sung-Jun Park <sungjun07.park@samsung.com>,
	yongmyung lee <ymhungry.lee@samsung.com>,
	Jinyoung CHOI <j-young.choi@samsung.com>,
	Adel Choi <adel.choi@samsung.com>,
	BoRam Shin <boram.shin@samsung.com>,
	SEUNGUK SHIN <seunguk.shin@samsung.com>
Subject: Re: [PATCH v16 1/3] scsi: ufs: Introduce HPB feature
Date: Sat, 19 Dec 2020 13:55:20 +0100	[thread overview]
Message-ID: <X934OOlXSf5up8Rd@kroah.com> (raw)
In-Reply-To: <DM6PR04MB6575AC2A541FCAAB60E581FBFCC20@DM6PR04MB6575.namprd04.prod.outlook.com>

On Sat, Dec 19, 2020 at 12:48:31PM +0000, Avri Altman wrote:
> > 
> > 
> > On Sat, Dec 19, 2020 at 06:18:47PM +0900, Daejun Park wrote:
> > > +static int ufshpb_get_state(struct ufshpb_lu *hpb)
> > > +{
> > > +     return atomic_read(&hpb->hpb_state);
> > > +}
> > > +
> > > +static void ufshpb_set_state(struct ufshpb_lu *hpb, int state)
> > > +{
> > > +     atomic_set(&hpb->hpb_state, state);
> > > +}
> > 
> > You have a lock for the state, and yet the state is an atomic variable
> > and you do not use the lock here at all.  You don't use the lock at all
> > infact...
> > 
> > So either the lock needs to be dropped, or you need to use the lock and
> > make the state a normal variable please.
> hpb_state_lock is mainly protecting the list of active regions.
> Just grep  lh_lru_rgn in patch 2/3.

Then why is the lock added in this patch if it is not used here?

thanks,

greg k-h

  reply	other threads:[~2020-12-19 12:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20201219091802epcms2p2c86f7ae2e81aa015702572a8ef180dae@epcms2p2>
2020-12-19  9:18 ` [PATCH v16 0/3] scsi: ufs: Add Host Performance Booster Support Daejun Park
     [not found]   ` <CGME20201219091802epcms2p2c86f7ae2e81aa015702572a8ef180dae@epcms2p7>
2020-12-19  9:18     ` [PATCH v16 1/3] scsi: ufs: Introduce HPB feature Daejun Park
2020-12-19 10:36       ` Greg KH
2020-12-19 12:48         ` Avri Altman
2020-12-19 12:55           ` Greg KH [this message]
     [not found]       ` <CGME20201219091802epcms2p2c86f7ae2e81aa015702572a8ef180dae@epcms2p6>
2020-12-21  2:35         ` Daejun Park
     [not found]   ` <CGME20201219091802epcms2p2c86f7ae2e81aa015702572a8ef180dae@epcms2p1>
2020-12-19  9:19     ` [PATCH v16 2/3] scsi: ufs: L2P map management for HPB read Daejun Park
2020-12-21  2:34     ` Re: [PATCH v16 1/3] scsi: ufs: Introduce HPB feature Daejun Park
2020-12-19  9:20 ` [PATCH v16 3/3] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park

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=X934OOlXSf5up8Rd@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Avri.Altman@wdc.com \
    --cc=adel.choi@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=boram.shin@samsung.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=daejun7.park@samsung.com \
    --cc=huobean@gmail.com \
    --cc=j-young.choi@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=seunguk.shin@samsung.com \
    --cc=stanley.chu@mediatek.com \
    --cc=sungjun07.park@samsung.com \
    --cc=ymhungry.lee@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

Powered by JetHome