Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3035241pxu; Tue, 8 Dec 2020 01:32:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJw3bMpnxJHyQ4GcgmfFvppAYzih2v3gWiC7cixUV45umMBI8ZHfrCo5eE12DIPY0Bh6ST+5 X-Received: by 2002:a50:e68a:: with SMTP id z10mr24019598edm.66.1607419925429; Tue, 08 Dec 2020 01:32:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607419925; cv=none; d=google.com; s=arc-20160816; b=OLvJV27qTy9D/76u+eRxI2y5OsF8YAiSdm4H+Vp5ECxqI7rrtu9JG8R6NP+rsVq00D guavdWKK8O34xgV/U+TuK8uGVr/q08f+9qHe2Mkja8PXFCEbtSI+b1CuxBc3rix/rgcg w4TSiIbiMsnq3CnpweB4zNxPNxOA9zXJF4i0/xEHPLwXkimo/r3o7AmXkn2poXZdUbJc ZtZoar46zGMcC8wOS1gEMN9ROhD7Xluz0nsNo2MuuzcSEe96Zy631yUdp5BhQMzenZz3 CPcuwwdeeWmZ/69dKy/dLx8fERUS5k86Y6Wu94ZqCjbLB5uvt1uZrNbXq4fqTQ4Spwuz fv0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=DCal8pdN1KwPJFQ1ZBJiorvnR+2z0SoZvbRYTGGN2w8=; b=PIdXnhx3+bobJPgQ1nb4fsjXYBW91tWFsR9u3ChOaF0K86ofbo4wKpoT24//hrQP1T waztRVyea5vxYgObMKDCclLuLFamgQO0UX2iqavRpsViewXPkrPSMjck9k1s2Pgm7OOh 0uDc5CiijYlRqHuw+4EiTZ1c4i15hCr04ttlMBJKllbWU4RZcWsQf5C6TMVwM6n7BSSX rgyLpwkafinhzNfn0/LfkVFJBuZj3lTdZ13UVJLAAaClu8sl8rRVDWImCgBZN2y7kMMy w2YE+Mgfiak6twmIdXkbjK7VIhLOGieS++yHwX43qQebatlb8QJBifmnz4ToZWaqEEv1 3BcQ== 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 co17si9874080edb.518.2020.12.08.01.31.43; Tue, 08 Dec 2020 01:32:05 -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; 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 S1728803AbgLHJ1Q (ORCPT + 99 others); Tue, 8 Dec 2020 04:27:16 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:8725 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728691AbgLHJ1Q (ORCPT ); Tue, 8 Dec 2020 04:27:16 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CqvtT66hFzkn9x; Tue, 8 Dec 2020 17:25:53 +0800 (CST) Received: from [10.136.114.67] (10.136.114.67) by smtp.huawei.com (10.3.19.213) with Microsoft SMTP Server (TLS) id 14.3.487.0; Tue, 8 Dec 2020 17:26:31 +0800 Subject: Re: [PATCH v2 3/3] erofs: simplify try_to_claim_pcluster() To: Gao Xiang , CC: LKML , Chao Yu References: <20201207012346.2713857-1-hsiangkao@redhat.com> <20201207012346.2713857-3-hsiangkao@redhat.com> From: Chao Yu Message-ID: <105f3d9b-fe6d-ff86-afcb-f0048a24479d@huawei.com> Date: Tue, 8 Dec 2020 17:26:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20201207012346.2713857-3-hsiangkao@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.114.67] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/7 9:23, Gao Xiang wrote: > simplify try_to_claim_pcluster() by directly using cmpxchg() here > (the retry loop caused more overhead.) Also, move the chain loop > detection in and rename it to z_erofs_try_to_claim_pcluster(). Looks more clean. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,