From: "정요한(JOUNG YOHAN) Mobile SE" <yohan.joung@sk.com>
To: "avri.altman@wdc.com" <avri.altman@wdc.com>
Cc: "alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"cang@codeaurora.org" <cang@codeaurora.org>,
"d_hyun.kwon@samsung.com" <d_hyun.kwon@samsung.com>,
"daejun7.park@samsung.com" <daejun7.park@samsung.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"huobean@gmail.com" <huobean@gmail.com>,
"j-young.choi@samsung.com" <j-young.choi@samsung.com>,
"jaemyung.lee@samsung.com" <jaemyung.lee@samsung.com>,
"최재영(CHOI JAE YOUNG) Mobile SE" <jaeyoung21.choi@sk.com>,
"javier.gonz@samsung.com" <javier.gonz@samsung.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"jh.i.park@samsung.com" <jh.i.park@samsung.com>,
"jieon.seol@samsung.com" <jieon.seol@samsung.com>,
"keosung.park@samsung.com" <keosung.park@samsung.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
"sungjun07.park@samsung.com" <sungjun07.park@samsung.com>,
"정요한(JOUNG YOHAN) Mobile SE" <yohan.joung@sk.com>
Subject: RE: [PATCH v37 3/4] scsi: ufs: Prepare HPB read for cached sub-region
Date: Sun, 13 Jun 2021 23:40:04 +0000 [thread overview]
Message-ID: <d38fbfa83d1f421c8a0d201a3cb6dce3@sk.com> (raw)
> > >+ /*
> > >+ * If the region state is active, mctx must be allocated.
> > >+ * In this case, check whether the region is evicted or
> > >+ * mctx allcation fail.
> > >+ */
> > >+ if (unlikely(!srgn->mctx)) {
> > >+ dev_err(&hpb->sdev_ufs_lu->sdev_dev,
> > >+ "no mctx in region %d subregion %d.\n",
> > >+ srgn->rgn_idx, srgn->srgn_idx);
> > >+ return true;
> > >+ }
> > >+
> > >+ if ((srgn_offset + cnt) > bitmap_len)
> > >+ bit_len = bitmap_len - srgn_offset;
> > >+ else
> > >+ bit_len = cnt;
> > >+
> > >+ if (find_next_bit(srgn->mctx->ppn_dirty, bitmap_len,
> > >+ srgn_offset) < bit_len + srgn_offset)
> > >+ return true;
> > >+
> >
> > It seems unnecessary to search through bitmap_len
> > How about searching by transfer size?
> >
> > if (find_next_bit(srgn->mctx->ppn_dirty,
> > bit_len + srgn_offset, srgn_offset) < bit_len + srgn_offset)
> Isn't bit_len should be used for size, and not bit_len + srgn_offset ?
then find_next_bit checks from start to bit_len.
find_next_bit stops checking if start is greater than bit_len.
it does not check for dirty as transfer_size.
Thanks
Yohan
>
> Thanks,
> Avri
>
> >
> > Thanks
> > Yohan
next reply other threads:[~2021-06-13 23:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-13 23:40 정요한(JOUNG YOHAN) Mobile SE [this message]
2021-06-14 6:48 ` [PATCH v37 3/4] scsi: ufs: Prepare HPB read for cached sub-region Avri Altman
-- strict thread matches above, loose matches on Subject: below --
2021-06-14 7:44 정요한(JOUNG YOHAN) Mobile SE
2021-06-11 5:07 정요한(JOUNG YOHAN) Mobile SE
2021-06-13 10:20 ` Avri Altman
[not found] <CGME20210611022142epcms2p374ea5b82cfe122de69a7fefe27edf856@epcms2p2>
2021-06-11 2:21 ` [PATCH v37 0/4] scsi: ufs: Add Host Performance Booster Support Daejun Park
2021-06-11 2:23 ` [PATCH v37 3/4] 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=d38fbfa83d1f421c8a0d201a3cb6dce3@sk.com \
--to=yohan.joung@sk.com \
--cc=alim.akhtar@samsung.com \
--cc=asutoshd@codeaurora.org \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cang@codeaurora.org \
--cc=d_hyun.kwon@samsung.com \
--cc=daejun7.park@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=huobean@gmail.com \
--cc=j-young.choi@samsung.com \
--cc=jaemyung.lee@samsung.com \
--cc=jaeyoung21.choi@sk.com \
--cc=javier.gonz@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=jh.i.park@samsung.com \
--cc=jieon.seol@samsung.com \
--cc=keosung.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stanley.chu@mediatek.com \
--cc=sungjun07.park@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.