Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp868680ybs; Mon, 25 May 2020 00:54:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrNTlGIgF+De3UwxtMlyTzadz32DA3RZeWKmdTjh2FavTY5PKBn0qcafWvZhCPQUzSgrxy X-Received: by 2002:a05:6402:b0b:: with SMTP id bm11mr14496855edb.92.1590393254691; Mon, 25 May 2020 00:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590393254; cv=none; d=google.com; s=arc-20160816; b=wAV+Pp48n4GLCufUTKbg60dDfjN8JLDYStYRX9xoR9XK3wSyYIB0jKjlNnjyeBRLBJ QQvd605aBm0yXxxMAt/Csx4ua4OzNO0lR7pSvaQBv5j9WIVNoUK66i2R93acEeaMPDeF cUm1BNZaW02SG4uvkh4PtE7EwFEAqNFqrDL08eGWxVQueXVCvLse6sczgdqOZslq6/IL gfP6Tq2x8iCJwFpcDYVZ8+6N1FlFa1eGF8Bn0bWw7Jkwan2HC7s2etXrMyDhQm4cppqP Y18xCx+Qbz47Jicr+FYwH9yV9hA55BfWJwpvWHXctMK7W9Ry3URqNisR82ZZnmmnShOW JUtw== 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=aiJ8u16FFam67RdS2KQbXUp7l+s/rlvVGh5bfftCGEk=; b=p2sUsZ3M1QIs8PJLX5jQ04rFfZZKQq8XWcSljJtvaS48OT04duHA7OeuwRgNLAn0BF oICSEGYBSSKAN9BKaDDL4b7IwKD/3GjLesYrRJXlOpuHevEFABjLcH42HW750q1+IETW zDwj8/VgIxpTKOMPdBUdAgEcaRFo3f1rTOkusruVK7a179wJYnFi9jjkxxnARgd+THIL N53Fwq7vEwyjv4UPpw5pIDYniRWmkhrv0ksapfRuR4A2t/Ppnk1KKkYrWIN41Z66uRQN 8ypkgxdJ/EOB2lmghOXJyBry9WdMY4j1owonm3TJDDkaVFZNTUPkeyW4i/0krEHpuaKF UMsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=Lg6rvz4M; 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 d8si8603044ejk.317.2020.05.25.00.53.50; Mon, 25 May 2020 00:54:14 -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=Lg6rvz4M; 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 S1729559AbgEYFnG (ORCPT + 99 others); Mon, 25 May 2020 01:43:06 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:15919 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725763AbgEYFnG (ORCPT ); Mon, 25 May 2020 01:43:06 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200525054302epoutp03be5ed1e4b56969dbef0d17a677e8aff3~SLxRMykdC2281622816epoutp03z for ; Mon, 25 May 2020 05:43:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200525054302epoutp03be5ed1e4b56969dbef0d17a677e8aff3~SLxRMykdC2281622816epoutp03z DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1590385382; bh=aiJ8u16FFam67RdS2KQbXUp7l+s/rlvVGh5bfftCGEk=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=Lg6rvz4Mw6ddLtY0jVPspn0NSARm7T1ARu+T5TvVFTrYxVgiJ2YUU6KmUpA8/yJkd x6yQCuZDAWrwrSQzwXvK8J3i0NdmC9yDvqvZ1nliIK1Oi9gno7SneNFj6rw/CPF/Kz kKArY1GgTxHWkAFqs7lTAX63nNTKKk0PcXUWyDBk= Received: from epcpadp2 (unknown [182.195.40.12]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20200525054302epcas1p34ede270a299c8448dc29c0d1e1c61f99~SLxQqIPPO3256032560epcas1p3j; Mon, 25 May 2020 05:43:02 +0000 (GMT) Mime-Version: 1.0 Subject: Re: Another approach of UFSHPB Reply-To: daejun7.park@samsung.com From: Daejun Park To: Bart Van Assche , yongmyung lee , Avri Altman , "James E . J . Bottomley" , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: ALIM AKHTAR , "asutoshd@codeaurora.org" , Zang Leigang , Avi Shchislowski , Bean Huo , "cang@codeaurora.org" , "stanley.chu@mediatek.com" , MOHAMMED RAFIQ KAMAL BASHA , Sang-yoon Oh , Jinyoung CHOI , Adel Choi , BoRam Shin , Sung-Jun Park , Daejun Park X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <231786897.01590385382061.JavaMail.epsvc@epcpadp2> Date: Mon, 25 May 2020 14:40:53 +0900 X-CMS-MailID: 20200525054053epcms2p490f99d5a07c9166e09fd28c0d6f1f1bb 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: 20200516171420epcas2p108c570904c5117c3654d71e0a2842faa References: <835c57b9-f792-2460-c3cc-667031969d63@acm.org> <1589538614-24048-1-git-send-email-avri.altman@wdc.com> <231786897.01589928601376.JavaMail.epsvc@epcpadp1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I am Daejun Park who is working to patch HPB driver. Thank you for your comment, and the following is our answer. > Splitting the UFS driver into multiple modules would be great if the > interface between these modules can be kept small and elegant. However, > I'm not sure that this approach should be based on Linux device driver > bus concept. Devices can be unbound at any time from their driver by > writing into the "unbind" sysfs attribute. I don't think we want the UFS > core functionality ever to be unbound while any other UFS functionality > is still active. Has it been considered to implement each feature as a > loadable module without relying on the bus model? The existing kernel > module infrastructure already prevents to unload modules (e.g. the UFS > core) that are in use by a kernel module that depends on it (e.g. UFS HPB). The HPB driver is close to the UFS core function, but it is not essential for operating UFS device. With reference to this article (https://lwn.net/Articles/645810/), we implemented extended UFS-feature as bus model. Because the HPB driver consumes the user's main memory, it should support bind / unbind functionality as needed. We implemented the HPB driver can be unbind / unload on runtime. > What will happen if a feature module is unloaded (e.g. HPB) while I/O is > ongoing that relies on HPB? In the HPB driver, it checks whether the HPB can be unload / unbind through the reference counter. Therefore, there is no problem that the driver is unloaded / unbind when there is I/O related to HPB. > Should these parameters be per module or per UFS device? I think it is necessary to take parameters for each module. This is because each extended UFS-feature module has different functions and may require different parameters. Thanks, Daejun Park.