Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1673108ybt; Mon, 15 Jun 2020 06:38:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAEQEeOhyEg2OCebTJTOKB4Kf6N5a/dyrfI9UXygONY+NHYUPwTkycOZG97IxKQFJLqIzq X-Received: by 2002:a17:906:3745:: with SMTP id e5mr25801133ejc.19.1592228314441; Mon, 15 Jun 2020 06:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592228314; cv=none; d=google.com; s=arc-20160816; b=qNL0dOfRf3gngKRAYMdQMLpotVtx4zONfhquZoWbTj3YkkH20k6wkN5nFiLyaH5wtj OhJp7vnHtLkNezQ3hnbQCsYLnoQmciauObug7hGzHt/WhKdPQfcGQfynR/eNz+vbnhqR MHlvdEJ0jPt/WTmA2u/U9aViYy73bsHbV+dLCq5QZZbRSHkEaw8/HSWycl1KqbvqCmjA IMH1QQGa4zNfDTHJolMzVhQ8enI7S4GfQkAZJlTbG+xlSQZ4WgyOU2y/Lw9SRU0MWVIz FMts66aLffEe3VHCiM2TaeafAn/T3iMPg/zjL99g5z/triprG4jLSqgxHW83Ey75qBK8 MisQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=7MDMIhrPCOKcrAndBvYfcPybYXdRjufTM858g2lxGDI=; b=pXLdd/aoKIUnQdlpD8CGUFegl5l/8i2OFNqQR3nf7djFIWIPcehdkRUy+uQYaYnHDU L9d9EJTulqKkQ/unWxvfrUW6HXdkAV/bLdp6xF9MGeDAlpXg9a9nYIRIgiMzeUPAkX1j LGNTxcoPjN3koQUnKPve5E2DUKT1E80F8nfWNiXTGG9PMNdgpvN2uA9hARGbpqGNVnjC 9ughEJLuV1BwTAFjJQyEb4n3jSgCZz3TQ2P+c5XLmqWa2cAnGtjSjPw13keeAC9luY/X 3NMebpLRlTGEwHXf8UiltJmc1U/4Q1w7DfZYA+mQW6kioQnweS/0dVAXcEFa49WBdBnN Vxpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PtKA38Il; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p11si8876545edq.151.2020.06.15.06.38.11; Mon, 15 Jun 2020 06:38:34 -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=@gmail.com header.s=20161025 header.b=PtKA38Il; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730567AbgFONfy (ORCPT + 99 others); Mon, 15 Jun 2020 09:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730299AbgFONfx (ORCPT ); Mon, 15 Jun 2020 09:35:53 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6633DC061A0E; Mon, 15 Jun 2020 06:35:52 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id q11so17181780wrp.3; Mon, 15 Jun 2020 06:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=7MDMIhrPCOKcrAndBvYfcPybYXdRjufTM858g2lxGDI=; b=PtKA38IlXmGkHf4e76zkzGjseXBXiyB0que/eRK62p/+VjCpZqUzwnuRxTpam3e12h aCCWe7JRQ7ZwVdAFdEdLeX0YZyEMoegG+0enO3VIbkjPKdRS5M00SChY9NSZ2gHnvWLz rc2KzPKeD5z/LuvE2TLs5aztcc1Lp0toLUu4BQnqgCNu8NUVSPKjQxhgOMXmtZYZwik2 wFxcwL0fCXQmRPN6J6+h1yAt8flScEGgfk8+TKCdj0sUFBIXTclUE0TrRsH2oA3bTOnE 8nT+xmgSt+YZkHnO+kEolx+gPnivmu6MigKO7ZyGpy0ixv1ME85k9v/Jv5SLd2cFZxeJ x/Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=7MDMIhrPCOKcrAndBvYfcPybYXdRjufTM858g2lxGDI=; b=cHXU0izO/2LyeOP+0I7pVGUGoYarB+Kp7H59/O+PJ5Y59vGOuWoEqkN4FaVtEzw8c3 +syAz4qnZ8H4E+wJniytygz3Y150gzGJUpPAVb8POOOsCsYf4SLd/NCz9vU7OZADzaNM NnOtjzHGqBwz2UB290XQ5VInaeS3r+hZRzTbLMF04sE4Jwmx+gXyIShTXnBvcRZ6+Af/ lEpKfPlo2WiTX95rvpLX32d7Jrqka8FtpiC6vgPhZQJLPx+C1jwaAJ5iwdcXQdv7+8uR zdP1zyx7cN41VG0Bw1n4Vrxwl05TmjK5XHdJtYlSYyw9e/PIWufNK1R60LNWqrgyzpth +e+w== X-Gm-Message-State: AOAM5335TYGoomlXcj/v9lShesoU0F2tlNIdeeEJXUHUAEpzt/8iOAou Wd2ophigE9TdjX5LoWsT5dA= X-Received: by 2002:a5d:5001:: with SMTP id e1mr31141470wrt.56.1592228151178; Mon, 15 Jun 2020 06:35:51 -0700 (PDT) Received: from ubuntu-laptop ([2a01:598:b10e:413b:41dc:307c:ea47:9556]) by smtp.googlemail.com with ESMTPSA id u3sm23247094wmg.38.2020.06.15.06.35.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Jun 2020 06:35:50 -0700 (PDT) Message-ID: <078bb71ddc9cda4454d213333afa4b6a905b8b09.camel@gmail.com> Subject: Re: [RFC PATCH v2 4/5] scsi: ufs: L2P map management for HPB read From: Bean Huo To: daejun7.park@samsung.com, 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 Date: Mon, 15 Jun 2020 15:35:47 +0200 In-Reply-To: <231786897.01592214002170.JavaMail.epsvc@epcpadp1> References: <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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daejun 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? Actually, there are two reasons for this way: 1. Latency of loading mapping entries is lower comparing to your curret approach. 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. Thanks, Bean