mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: hyenc.jeong@samsung.com,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: ALIM AKHTAR <alim.akhtar@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jinyoung Choi <j-young.choi@samsung.com>,
	Dukhyun Kwon <d_hyun.kwon@samsung.com>,
	Jeuk Kim <jeuk20.kim@samsung.com>,
	Keoseong Park <keosung.park@samsung.com>,
	Jaemyung Lee <jaemyung.lee@samsung.com>,
	Jieon Seol <jieon.seol@samsung.com>,
	Gyusun Lee <gyusun.lee@samsung.com>,
	Yunjae Jo <yunjae00.jo@samsung.com>
Subject: Re: [PATCH v2] scsi: ufs: Add support for the aggregated read query opcode
Date: Thu, 23 Jul 2026 12:27:09 -0700	[thread overview]
Message-ID: <94ebf206-5d9b-4ab3-a9ec-af80de45f3c2@acm.org> (raw)
In-Reply-To: <20260723074724epcms2p16cc926dd07e3f932db8efb71d1e1268c@epcms2p1>

On 7/23/26 12:47 AM, Hyeoncheol Jeong wrote:
> Thanks a lot for the detailed review. I've addressed the comments and
> will send a v3. Replies inline below.

Please post v3 as a new email thread instead of a reply to this thread.
Replies are overlooked more easily than a new thread.

> On 7/23/26 2:09 AM, Bart Van Assche wrote:

>>> +static inline size_t ufshcd_get_devman_ucd_size(const struct ufs_hba *hba)
>>> +{
>>> +    return sizeof(struct utp_devman_cmd_desc) + SG_ALL * ufshcd_sg_entry_size(hba);
>>> +}
>>
>> Why SG_ALL? The data buffer for device management commands is allocated
>> with kmalloc() and hence is contiguous so a single segment descriptor
>> should be sufficient.
> 
> This is the one comment I haven't applied yet, and I'd like to
> double-check with you before doing so.
> 
> The aggregated read path indeed does not use the PRDT at all. But
> the reserved tag is also used by advanced RPMB. I understood that path
> builds a PRDT via ufshcd_sgl_to_prdt() from the BSG payload, whose sg_cnt
> can exceed one when the user buffer spans multiple segments. Keeping
> SG_ALL preserves the existing RPMB behaviour; I thought shrinking to a
> single segment could truncate multi-segment transfers.
> 
> Did I miss something about how RPMB maps its payload here?

BSG uses struct sg_io_v4 and that data structure supports I/O vectors.
How about changing SG_ALL into 2, which should be sufficient for 4096
bytes spread over two discontiguous physical pages? I think it's fine
not to support the I/O vectors that can be generated by user space code
like this program:
https://github.com/linux-blktests/blktests/blob/master/src/discontiguous-io.cpp

Thanks,

Bart.

      reply	other threads:[~2026-07-23 19:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260710053524epcms2p82121eba4240c37112fc5669430035442@epcms2p6>
2026-07-10  5:45 ` [PATCH] " Hyeoncheol Jeong
2026-07-10 14:46   ` Bart Van Assche
     [not found]   ` <CGME20260710053524epcms2p82121eba4240c37112fc5669430035442@epcms2p4>
2026-07-13  2:52     ` Hyeoncheol Jeong
2026-07-13 12:55       ` Bart Van Assche
2026-07-16  2:51     ` Hyeoncheol Jeong
2026-07-22  8:48     ` [PATCH v2] " Hyeoncheol Jeong
2026-07-22 17:08       ` Bart Van Assche
     [not found]       ` <CGME20260710053524epcms2p82121eba4240c37112fc5669430035442@epcms2p1>
2026-07-23  7:47         ` Hyeoncheol Jeong
2026-07-23 19:27           ` Bart Van Assche [this message]

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=94ebf206-5d9b-4ab3-a9ec-af80de45f3c2@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=d_hyun.kwon@samsung.com \
    --cc=gyusun.lee@samsung.com \
    --cc=hyenc.jeong@samsung.com \
    --cc=j-young.choi@samsung.com \
    --cc=jaemyung.lee@samsung.com \
    --cc=jeuk20.kim@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=yunjae00.jo@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

all inboxes | Powered by JetHome®