From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 312F0C2B9F4 for ; Sun, 20 Jun 2021 00:26:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 66FED610EA for ; Sun, 20 Jun 2021 00:26:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66FED610EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C5D0A6B006E; Sat, 19 Jun 2021 20:26:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C0D316B0070; Sat, 19 Jun 2021 20:26:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD4E16B0072; Sat, 19 Jun 2021 20:26:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 761AD6B006E for ; Sat, 19 Jun 2021 20:26:20 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0362D8249980 for ; Sun, 20 Jun 2021 00:26:19 +0000 (UTC) X-FDA: 78272210520.28.9A13CED Received: from r3-23.sinamail.sina.com.cn (r3-23.sinamail.sina.com.cn [202.108.3.23]) by imf09.hostedemail.com (Postfix) with SMTP id 2DC86600056C for ; Sun, 20 Jun 2021 00:26:16 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([123.115.166.128]) by sina.com (172.16.97.23) with ESMTP id 60CE8B25000188A2; Sun, 20 Jun 2021 08:26:14 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 62568354919404 From: Hillf Danton To: Miaohe Lin Cc: akpm@linux-foundation.org, vitalywool@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mikhail Gavrilov , Hillf Danton Subject: Re: [PATCH 6/6] mm/z3fold: use release_z3fold_page_locked() to release locked z3fold page Date: Sun, 20 Jun 2021 08:26:04 +0800 Message-Id: <20210620002604.1575-1-hdanton@sina.com> In-Reply-To: <20210619093151.1492174-7-linmiaohe@huawei.com> References: <20210619093151.1492174-1-linmiaohe@huawei.com> MIME-Version: 1.0 Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.23 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 2DC86600056C X-Stat-Signature: 86heskbi39e8ab54i4536upxukwzatr6 X-HE-Tag: 1624148776-687255 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.002620, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, 19 Jun 2021 17:31:51 +0800 Miaohe Lin wrote: > We should use release_z3fold_page_locked() to release z3fold page when = it's > locked, although it looks harmless to use release_z3fold_page() now. >=20 > Fixes: dcf5aedb24f8 ("z3fold: stricter locking and more careful reclaim= ") > Signed-off-by: Miaohe Lin > --- > mm/z3fold.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/mm/z3fold.c b/mm/z3fold.c > index 196d886a3436..b3c0577b8095 100644 > --- a/mm/z3fold.c > +++ b/mm/z3fold.c > @@ -1372,7 +1372,7 @@ static int z3fold_reclaim_page(struct z3fold_pool= *pool, unsigned int retries) > if (zhdr->foreign_handles || > test_and_set_bit(PAGE_CLAIMED, &page->private)) { > if (kref_put(&zhdr->refcount, > - release_z3fold_page)) > + release_z3fold_page_locked)) > atomic64_dec(&pool->pages_nr); LGTM. JFYI other issue in z3fold was reported [1] and if the fix proposed= there makes any sense to you feel free to pick it up and ask Mike for his tests= . [1] https://lore.kernel.org/linux-mm/20210316061351.1649-1-hdanton@sina.c= om/