Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2127118ybt; Mon, 15 Jun 2020 19:52:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhz7tGJ8K7WuxJbePerVPCo2C9TpqBOPbVT1Ek5STiqMiU8VlNtJF4i+GZ0HRJ1WiQnj6N X-Received: by 2002:a05:6402:206e:: with SMTP id bd14mr678467edb.105.1592275963762; Mon, 15 Jun 2020 19:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592275963; cv=none; d=google.com; s=arc-20160816; b=YXzSnmcsdz3h+IqiX4qX8p4/EqHflLmW+GyuDY4jtFGgz5mOaI+VBd99Rm39b9kioJ 0kEm1OiHpaWOhZo1ifJoFRGi8KuK9x0MaElL6Oyee28IH1FqG9lmNUCQOGHg/Qg1zIxa LWTTbOlzYzNwaIlZp1+uXCY5gZNJSWy9T+cH7Z6VGBNSmZQktWyehB/DDxXUoYikLeNV cAQ5KSjkPUF6V9RhdE5eIih5+NLP6sZDsqWxyWlNrOGHRiY8O2jCwMnuxBWAP4hnWTDO v6K2tHvneiQpS9DnnKhsFgoimYuwJGgF3uC2ZEca8AdxdLXFVTXfBCZDOD4wwPXJYoDl Vzvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:reply-to:subject:mime-version :dkim-signature:dkim-filter; bh=LxQRlTC7iL0L+qHFsNsjwE0X+VN3mnmMRGvEckdvV+Y=; b=E7zUtym2H965jECUS7YD/yweW9GBpByFJgHsKqKH6+YL1KAUo0wV1+jysnAXfCJGwA F1nBLLN2Io4+pajkIny3HIEasuIuRF+hGSm1rQRRLJ7hid7ouArmpvQH/1kqtfcRZHx5 cGnEDv5MKXquWIePAPQChnHTo1oi9AyN2iyyWnkh7qEuVF1kQUBSky2bH9nr+n1ZkIvy LSdIxpsVXrQm1JCVJNYUoMAl8yYFZe6OaNrj5t7M32FLqYzLz9ImrxaC0CvwzHrCibVr KtBvdUXg/Z/bTKaPTq2Qr8H/AAgJeyLOAJx+7s3rJkESjCqcHNbN+EYwUvArUJIWXhgt 1buA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=nQNDBZOC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si9741169edq.435.2020.06.15.19.52.19; Mon, 15 Jun 2020 19:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=nQNDBZOC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbgFPCuG (ORCPT + 99 others); Mon, 15 Jun 2020 22:50:06 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:28295 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgFPCuF (ORCPT ); Mon, 15 Jun 2020 22:50:05 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200616025002epoutp043f1e5a452b8d6a81f17141e69a04cb72~Y5mfwnsZ91477114771epoutp04N for ; Tue, 16 Jun 2020 02:50:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200616025002epoutp043f1e5a452b8d6a81f17141e69a04cb72~Y5mfwnsZ91477114771epoutp04N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1592275802; bh=LxQRlTC7iL0L+qHFsNsjwE0X+VN3mnmMRGvEckdvV+Y=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=nQNDBZOCWEgVt77xfPXuo5lnTdDRaPPMt8xnfA13g4X2FHFJXJqKVYcHPcuLJjP/L tJdzzuEsJvjQ2KKeOqXNXfhMCcvnnLevuQc1/uw2WKFQlIVxor9rVgU01laaj6/ekd ahyRJSUhHQhNnhT7NQ9VmICLg/glth6MBhCxaoig= Received: from epcpadp1 (unknown [182.195.40.11]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200616025001epcas1p2bac7260510918b8e2ae55da822437f52~Y5mfXXVo82697926979epcas1p2b; Tue, 16 Jun 2020 02:50:01 +0000 (GMT) Mime-Version: 1.0 Subject: Re: [RFC PATCH v2 4/5] scsi: ufs: L2P map management for HPB read Reply-To: daejun7.park@samsung.com From: Daejun Park To: Bean Huo , Daejun Park , ALIM AKHTAR , "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "tomas.winkler@intel.com" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <078bb71ddc9cda4454d213333afa4b6a905b8b09.camel@gmail.com> X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <231786897.01592275801931.JavaMail.epsvc@epcpadp1> Date: Tue, 16 Jun 2020 10:17:44 +0900 X-CMS-MailID: 20200616011744epcms2p781f586af00852f67a62d9b557ee05591 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20200615062708epcms2p19a7fbc051bcd5e843c29dcd58fff4210 References: <078bb71ddc9cda4454d213333afa4b6a905b8b09.camel@gmail.com> <231786897.01592213402355.JavaMail.epsvc@epcpadp1> <231786897.01592212081335.JavaMail.epsvc@epcpadp2> <336371513.41592205783606.JavaMail.epsvc@epcpadp2> <231786897.01592205482200.JavaMail.epsvc@epcpadp2> <231786897.01592214002170.JavaMail.epsvc@epcpadp1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bean > > > On Mon, 2020-06-15 at 18:30 +0900, Daejun Park wrote: > > +static int ufshpb_execute_map_req(struct ufshpb_lu *hpb, > > + struct ufshpb_req *map_req) > > +{ > > + struct request_queue *q; > > + struct request *req; > > + struct scsi_request *rq; > > + int ret = 0; > > + > > + q = hpb->sdev_ufs_lu->request_queue; > > + ret = ufshpb_map_req_add_bio_page(hpb, q, map_req->bio, > > + map_req->mctx); > > + if (ret) { > > + dev_notice(&hpb->hpb_lu_dev, > > + "map_req_add_bio_page fail %d - %d\n", > > + map_req->rgn_idx, map_req->srgn_idx); > > + return ret; > > + } > > + > > + req = map_req->req; > > + > > + blk_rq_append_bio(req, &map_req->bio); > > + > > + req->timeout = 0; > > + req->end_io_data = (void *)map_req; > > + > > + rq = scsi_req(req); > > + ufshpb_set_read_buf_cmd(rq->cmd, map_req->rgn_idx, > > + map_req->srgn_idx, hpb- > > >srgn_mem_size); > > + rq->cmd_len = HPB_READ_BUFFER_CMD_LENGTH; > > + > > + blk_execute_rq_nowait(q, NULL, req, 1, > > ufshpb_map_req_compl_fn); > > > HPB map_req is now being en-queued in sdev->request_queue. > This is ok for the HPB v1.0. Have you ever been thinking about > changing this way to directly issue HPB requests to UFS? I think it is enough to support HPB. > Actually, there are two reasons for this way: > > 1. Latency of loading mapping entries is lower comparing to your curret > approach. Our map request style utilizes block layer API. It makes the codes keep simple and reliable. Also, I think the latency of loading mapping entries is not critical for HPB. Futhermore, I think the other requests from user is important than loading mapping entries. If the map_work issues map request directly, the user requests can be disturbed by map requests. > 2. Also, it is preparing for the HPB v2.0. After all HPB 1.0 only > supports 4KB read, this is useless, I am looking for the HPB v2.0. I don't understand this comment. In HPB v2.0, this code can be used without changing. Thanks, Daejun