Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp128153ybg; Mon, 8 Jun 2020 18:25:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJziwZKIABNTLRJBsso38t8V+bJ3xQiAKmMcd1g4PhIhnU9UaGygmEC078Kl0qzcj5HdPkvb X-Received: by 2002:a17:906:ce28:: with SMTP id sd8mr14832432ejb.280.1591665936204; Mon, 08 Jun 2020 18:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591665936; cv=none; d=google.com; s=arc-20160816; b=HUrBQn74JrppkuRoFFsiLb2/AFGf/+OqH29ZKg34T7abeHXcF7JXsHmxddqgExyxi5 OcAjiR61vuHgmMIn4CIspkecEepbPfAFjSRtqjGl/HMjBiMg9cc03M6KoLiOixYwvZ0L TCWLFlqA6RpHZbTvVd2024Ang68/h/9xVhovZl/aPcGdg/20DQnkK35b+fdkCt4lWnzc zyEJEbCg1hoIVl7BdP9FrkIcEsFhrWReBs1hLZ9wqz76yEypJN1UDWHzA2o2JnnSSWTn rr9hZ7E1KrdQZJtCxDGaLSP4xGWF0Q7MJFoaPE6a80kLYjEoJjRwpZ1LNCBTYz6jkPBR mp3w== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=thWSsCQrRP7ICtACTQ/R6uy4/jCeiC8AOikVtNmXUgI=; b=V8e1B0+ELs6YSBD1PAikh7xWGvAnJsNrIOHEabOLZhjsg+lSFis/o/3LO29suAtIrB v4hySlVH2gprgdAaKtb5GOvOBgwP1qXt13kBFJYSG1+RWkRhiMeRwH5z4AnpvdIVmJJI 7rO0KtU81AZFDW/GD5D7kwfmVjtz+2X47gaUZC+Z1tJbuas4IpBZF+XGZ9UCjy+fxbGi uLO4KhQY2VX07agMM50emh1mpH8QIeDqRp48h81xmQme6I1qNjnnOppLYaImsmvk9Wia Wtss3xhaYEHZkQeeRx4fWc5w+zU9Zov0080HT5g2hn+njWbs3g3x3MC9GPWQmZUXGTH0 2ZZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k26si9536773ejv.109.2020.06.08.18.25.12; Mon, 08 Jun 2020 18:25:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727842AbgFIBXT (ORCPT + 99 others); Mon, 8 Jun 2020 21:23:19 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:54999 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbgFIBXS (ORCPT ); Mon, 8 Jun 2020 21:23:18 -0400 Received: by mail-pj1-f65.google.com with SMTP id u8so630304pje.4; Mon, 08 Jun 2020 18:23:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=thWSsCQrRP7ICtACTQ/R6uy4/jCeiC8AOikVtNmXUgI=; b=UtWCTI/we+U4jGmAyM6VvkrLcW8lForjfZJo5LChohiFqu022wxI+7HZsbq1SxBpjP oSvKXAWyMZjwaRsXHFLotHmyUbm8Du3hdloTTHcKCCalM2sOinQEmo5MvbTvWZ76fEmd 90XhTrP1J6FQEO8kJWsuJtLZEuJ1RMvdSmpE2Q4PuLiWPC+zU2KXT/y7+ZFpae7SE1RR HLXovgUokx/p6qfzJ6bYwrXnZ0Uz0GvRbCvJ0gHDZR/cpx5gtlsh0t1sVqI6PKSspznD teY0Jps9xSFMMMpPaHpV/pWbrwIwpFtuBXEjrmOhx8AX4gFi3pzGeDHpndheauFNgx1s yQkQ== X-Gm-Message-State: AOAM533KxFHi4w8N5Eo6UsLO5zoejO9+uOCuttax6bSY2rMcLUD6vPR+ O7DaBoyBiJU9uTACdTk3sfg= X-Received: by 2002:a17:90a:7c07:: with SMTP id v7mr2037422pjf.38.1591665795589; Mon, 08 Jun 2020 18:23:15 -0700 (PDT) Received: from [192.168.50.147] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id i191sm8338180pfe.99.2020.06.08.18.23.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2020 18:23:14 -0700 (PDT) Subject: Re: [RFC PATCH 5/5] scsi: ufs: Prepare HPB read for cached sub-region To: Avri Altman , "daejun7.park@samsung.com" , ALIM AKHTAR , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.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 References: <963815509.21591323002276.JavaMail.epsvc@epcpadp1> <231786897.01591322101492.JavaMail.epsvc@epcpadp1> <336371513.41591320902369.JavaMail.epsvc@epcpadp1> <963815509.21591320301642.JavaMail.epsvc@epcpadp1> <231786897.01591320001492.JavaMail.epsvc@epcpadp1> <336371513.41591323603173.JavaMail.epsvc@epcpadp1> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWx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jUPknS6d+BETMhTkbGzoyS+sywEsQAgA+BMCxBH4LvUmHYhpS+W6CiZ3ZMxjO8Hgc ++w1mLeRUvda3i4/U8wDT3SWuHcB3DWlcppECLkAEQEAAYkBHwQYAQIACQUCVI67igIbDAAK CRBxXD01xc4QCZ4dB/0QrnEasxjM0PGeXK5hcZMT9Eo998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: Date: Mon, 8 Jun 2020 18:23:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-06 11:38, Avri Altman wrote: >> + for (i = 0; i < bit_len; i++) { >> + if (test_bit(srgn_offset + i, srgn->mctx->ppn_dirty)) > > Maybe use a mask or hweight instead of testing bit by bit? How about using find_next_bit() from include/linux/bitmap.h? /* * find_next_bit(addr, nbits, bit) Position next set bit in *addr * >= bit */ Thanks, Bart.