Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3547278pxb; Sun, 31 Jan 2021 20:32:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkgSa9PMPnhnGwN5iYx92mF6q7qIQGawSTy/OJMB5c2b9isgHSKw4qytqT3xKy9UAG9uqm X-Received: by 2002:a17:907:110f:: with SMTP id qu15mr9376296ejb.527.1612153967743; Sun, 31 Jan 2021 20:32:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612153967; cv=none; d=google.com; s=arc-20160816; b=v07RWpRO9D2D5U67KyyCtOTQQ5Bx05W6HOd9UlwJUcMBUrQbcy6MCrqgIaJJ+wnWtH 3apsIO3C4ASjQlIe4x5XZnPij+h7faR8M3+HcUz/OWF3FASmAtnrZFOCHSTRBMo4GauS m5wR5Zkgu2dIYTibwm7bxIF0jspX8gJEXOd14nlGv7Vodf+4JZnHcTRtwAAqAwmSVnjR Q5d/FV94OCA1DoIPNJt04CZusRhSuv8skkAcqmF5F6HsEOFg0SMmqkT0iM2WGpFAXTcv Gz1mTqeljDesfIc03gekWJfkzESVhd3S7eYk3uBJj1l8Teyl2y3fY4S/l+/jt8bZJreu WGsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=dw0dZpbp7++/1JRtnsngSTgQrJqru0N6BGIt535XPHk=; b=ap8FvhVBWITMqXe0ZVfZAd+WcDSR9MadRVnl8ix7xCe6MrrjAAsv/mJLRq8nXLctwz sHf7NzwGHCbWzie66imrlShDUNyWpljGNDKFqZrTNjvwndbQs5t+EmZQCfm7pnCIFJtK 1AadXa8ACe1z+95F2+jIOQ4Sb7fQvrUXR+qNMMySPDw0UxlloOQW71axl6qc0KKPZ9oB N5HuXz9P/DfLE4kI4njIuP6oporEzKtosWJAQFqa8Pvt4tJCLixy1ZfozPY4JnZ9lcsS GHz5lpBnklcAWUQ5Ec/6kUrhkAsL927WsdFb5h/m4QgW3tJ8Ma1Wp6BISXsOgyI+AYIf 69Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=GLqu0eVf; 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 h4si9684792edd.105.2021.01.31.20.32.22; Sun, 31 Jan 2021 20:32:47 -0800 (PST) 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=GLqu0eVf; 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 S231308AbhBAEav (ORCPT + 99 others); Sun, 31 Jan 2021 23:30:51 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:59955 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbhBAE3U (ORCPT ); Sun, 31 Jan 2021 23:29:20 -0500 Received: from epcas3p1.samsung.com (unknown [182.195.41.19]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20210201042803epoutp046f958e80538c643587575bae57047459~fhTvCgJdN2133921339epoutp04D for ; Mon, 1 Feb 2021 04:28:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20210201042803epoutp046f958e80538c643587575bae57047459~fhTvCgJdN2133921339epoutp04D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1612153683; bh=dw0dZpbp7++/1JRtnsngSTgQrJqru0N6BGIt535XPHk=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=GLqu0eVfuPjPDza1e+uzh18WNpHOnw/FnwD1agmgeXDH47O9SH2MpYK/gRlx3w2we LfuJlpeG1xP3v2P9KZyTJyJ3sDVzwCPARZ+VCcOLP1rJMHpbu5s2IEmHBikTc35p2B B41Af26HTQD7/gI3gt5WsfXgTtf5LYC9XR5WgSlg= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas3p1.samsung.com (KnoxPortal) with ESMTP id 20210201042801epcas3p1d4384e01e28f82b54809c5dc47fa98aa~fhTtlRHl30194001940epcas3p1f; Mon, 1 Feb 2021 04:28:01 +0000 (GMT) Received: from epcpadp4 (unknown [182.195.40.18]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4DTZgP5Bnyz4x9Pr; Mon, 1 Feb 2021 04:28:01 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [PATCH 4/8] scsi: ufshpb: Make eviction depends on region's reads Reply-To: daejun7.park@samsung.com Sender: Daejun Park From: Daejun Park To: "James E . J . Bottomley" , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "gregkh@linuxfoundation.org" , Bart Van Assche , yongmyung lee , Daejun Park , ALIM AKHTAR , "asutoshd@codeaurora.org" , Zang Leigang , Avi Shchislowski , Bean Huo , "cang@codeaurora.org" , "stanley.chu@mediatek.com" , Avri Altman X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20210127151217.24760-5-avri.altman@wdc.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: <1891546521.01612153681714.JavaMail.epsvc@epcpadp4> Date: Mon, 01 Feb 2021 12:59:33 +0900 X-CMS-MailID: 20210201035933epcms2p4213209edf14280e1b1603335328da7f4 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: 20210127151318epcas2p1cdad0118807907e55b8d8277daec6f1a References: <20210127151217.24760-5-avri.altman@wdc.com> <20210127151217.24760-1-avri.altman@wdc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Avri, > + /* > + * in host control mode, verify that the exiting region > + * has less reads > + */ > + if (ufshpb_mode == HPB_HOST_CONTROL && > + atomic64_read(&rgn->reads) > (EVICTION_THRSHLD >> 1)) Why we use shifted value to verify less read? I think we should use another value to verify. Thanks, Daejun