Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp431647ybt; Wed, 17 Jun 2020 05:00:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaDjlpFJxIHz//l3krjzYCC8tehiyW7mOLh+uiqumiDTwEd58yWQfUYFlOhGH9/vjpc6Go X-Received: by 2002:a17:906:5617:: with SMTP id f23mr6832751ejq.331.1592395252006; Wed, 17 Jun 2020 05:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592395251; cv=none; d=google.com; s=arc-20160816; b=dHUl+ugNMx22DBYoIz2GpuZnen0dYCVFB0+MPf8n8L6d27LCge/cIKdMq1l6Bf6MYR k/wGZyNdzlYr0bKxv/5PmSp2mgh5ZhyKj3hBJU+QAYf2eMDTRP3hpIgMU9w29bumI2Pj IsBkK2e18o8FnwIlabwEw8fmF/WvM5dTUmCtjFXcq+zgIf4u02/LFC+zzjtTSQkyhf06 Ckv88z5p6svilpbXcZz9k4lzbrV9qdGgZQ6rqr5Do9nMWgB3VONxprSkXupLjFndOcc+ rxNYqSaXN11iWHm7AGv7TxdEcyCVUtVzdoB/mlPSR2J8hCJotwV1P8QVPCuibWbCff+l vgLw== 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=z/9+1ybUONTNPwmt/FJ5Ns8irr9TIstMcjxiQL4SBfs=; b=FBwN5d65xy1f68V2cvWT3LM0oS6c9AdAwvlfs0+fCumvsEgVxr8I4N9SHqbUjCRjWN kEYNgvtotqAVI9ydSLcii+pUDVv7Z1Y3FU8trkVv60Vlzw7U0ze4OGrYNnpik8RbO+2F zbobe0brlRXPC2SKLzezA9Oh+fTwmbHB9SQ7F0c81uKd91Vu7bNQ5/kx1cD+MvfJZ8JA O/kNE92wLBDJ6Wi73c+q8tuHrzD+2eKnNgs6asZWhYcI9UxES+jltCP6cjjDlfHEGxLt xS5N9bezpwmKlcrvVEsdnqEdY8fyr60s1qDdrC7ezF2dk3Qo9jaXPBq/1/F+yzyqhGfL HKLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=slufTE79; 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 dt7si12719189ejb.395.2020.06.17.05.00.29; Wed, 17 Jun 2020 05:00:51 -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=slufTE79; 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 S1726729AbgFQL6F (ORCPT + 99 others); Wed, 17 Jun 2020 07:58:05 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:41455 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbgFQL6F (ORCPT ); Wed, 17 Jun 2020 07:58:05 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20200617115802epoutp02df9cf10dc139b0faddbb60fa974d91ac~ZUuP3jWFk1884718847epoutp02h for ; Wed, 17 Jun 2020 11:58:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20200617115802epoutp02df9cf10dc139b0faddbb60fa974d91ac~ZUuP3jWFk1884718847epoutp02h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1592395082; bh=z/9+1ybUONTNPwmt/FJ5Ns8irr9TIstMcjxiQL4SBfs=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=slufTE79UrRN8v+yDmkRK3topjC8Hf/5shgSEEsphwCN1KA4YdiuoliavNZSLsbmu UmE/euKltti7Q5bvm2YrdCofWQN27GXuayPOPQHgGFvqecPLAinKptXWoqvZ+g0RTK 3wtBh8KFPl7V7p16Ru6GK8lRtqP4a0nRvVvzQ5bs= Received: from epcpadp2 (unknown [182.195.40.12]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20200617115801epcas1p37d5545b6b352dc1d5c44992d6260d0d1~ZUuPcSeQ01421314213epcas1p3R; Wed, 17 Jun 2020 11:58:01 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [RFC PATCH v2 3/5] scsi: ufs: Introduce HPB module Reply-To: daejun7.park@samsung.com From: Daejun Park To: Avri Altman , Daejun Park , ALIM AKHTAR , "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: 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.01592395081831.JavaMail.epsvc@epcpadp2> Date: Wed, 17 Jun 2020 19:30:26 +0900 X-CMS-MailID: 20200617103026epcms2p5ca0dd6f6d540bad48967d7777fa6a530 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: <231786897.01592212081335.JavaMail.epsvc@epcpadp2> <336371513.41592205783606.JavaMail.epsvc@epcpadp2> <231786897.01592205482200.JavaMail.epsvc@epcpadp2> <231786897.01592213402355.JavaMail.epsvc@epcpadp1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > This is a patch for the HPB module. > > The HPB module queries UFS for device information during initialization. > > We added the export symbol to two functions in ufshcd.c to initialize > > the HPB module. > > > > The HPB module can be loaded or built-in as needed. > > The mininum size of the memory pool used in the HPB module is > Typo minimum > > > implemented > > as a module parameter, so that it can be configurable by the user. > > > > To gurantee a minimum memory pool size of 4MB: > > $ insmod ufshpb.ko ufshpb_host_map_kbytes=4096 > You are going through a lot of troubles to make it a loadable module. > What are, in your opinion, the pros and cons of this design decision? In my opinion... pros: 1. A user can unload an unnecessary module when there is an insufficient memory situation (HPB case). 2. Since each UFS vendor has a different way of implementing UFS features, it can be supported as a separate module. Otherwise, many quirks must be attached to module, which is not desirable way. 3. It is possible to distinguish parts that are not necessary for essential ufs operation. 4. It is advantageous to implement the latest functions according to the development speed of UFS. cons: 1. It is difficult work to be implemented as a module. 2. Modifying "ufsfeature.c" is required to implement the feature that can not supported by the exsiting "ufsf_operation". Thanks, Daejun