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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 15 Mar 2021 14:36:55 +0800
From:   Can Guo <cang@...eaurora.org>
To:     daejun7.park@...sung.com
Cc:     Greg KH <gregkh@...uxfoundation.org>, avri.altman@....com,
        jejb@...ux.ibm.com, martin.petersen@...cle.com,
        asutoshd@...eaurora.org, stanley.chu@...iatek.com,
        bvanassche@....org, huobean@...il.com,
        ALIM AKHTAR <alim.akhtar@...sung.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        JinHwan Park <jh.i.park@...sung.com>,
        Javier Gonzalez <javier.gonz@...sung.com>,
        SEUNGUK SHIN <seunguk.shin@...sung.com>,
        Sung-Jun Park <sungjun07.park@...sung.com>,
        Jinyoung CHOI <j-young.choi@...sung.com>,
        BoRam Shin <boram.shin@...sung.com>
Subject: Re: [PATCH v29 4/4] scsi: ufs: Add HPB 2.0 support

On 2021-03-15 09:31, Daejun Park wrote:
> This patch supports the HPB 2.0.
> 
> The HPB 2.0 supports read of varying sizes from 4KB to 512KB.
> In the case of Read (<= 32KB) is supported as single HPB read.
> In the case of Read (36KB ~ 512KB) is supported by as a combination of
> write buffer command and HPB read command to deliver more PPN.
> The write buffer commands may not be issued immediately due to busy 
> tags.
> To use HPB read more aggressively, the driver can requeue the write 
> buffer
> command. The requeue threshold is implemented as timeout and can be
> modified with requeue_timeout_ms entry in sysfs.
> 
> Signed-off-by: Daejun Park <daejun7.park@...sung.com>
> ---
> +static int ufshpb_issue_pre_req(struct ufshpb_lu *hpb, struct 
> scsi_cmnd *cmd,
> +				int *read_id)
> +{
> +	struct ufshpb_req *pre_req;
> +	struct request *req = NULL;
> +	struct bio *bio = NULL;
> +	unsigned long flags;
> +	int _read_id;
> +	int ret = 0;
> +
> +	req = blk_get_request(cmd->device->request_queue,

To keep symmetry with ufshpb_get_req(), can we use 
hpb->sdev_ufs_lu->request_queue?

Thanks,
Can Guo.

> +			      REQ_OP_SCSI_OUT | REQ_SYNC, BLK_MQ_REQ_NOWAIT);
> +	if (IS_ERR(req))
> +		return -EAGAIN;
> +
> +	bio = bio_alloc(GFP_ATOMIC, 1);
> +	if (!bio) {
> +		blk_put_request(req);
> +		return -EAGAIN;
> +	}
> +
> +	spin_lock_irqsave(&hpb->rgn_state_lock, flags);
> +	pre_req = ufshpb_get_pre_req(hpb);
> +	if (!pre_req) {
> +		ret = -EAGAIN;
> +		goto unlock_out;
> +	}
> +	_read_id = ufshpb_get_read_id(hpb);
> +	spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
> +
> +	pre_req->req = req;
> +	pre_req->bio = bio;
> +
> +	ret = ufshpb_execute_pre_req(hpb, cmd, pre_req, _read_id);
> +	if (ret)
> +		goto free_pre_req;
> +
> +	*read_id = _read_id;
> +
> +	return ret;
> +free_pre_req:
> +	spin_lock_irqsave(&hpb->rgn_state_lock, flags);
> +	ufshpb_put_pre_req(hpb, pre_req);
> +unlock_out:
> +	spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
> +	bio_put(bio);
> +	blk_put_request(req);
> +	return ret;
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ