Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3373986pxb; Sun, 20 Feb 2022 18:00:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwswiiKkD7T9SvzNaVr9kqkrojBS2CK5M+I8H/MtrtayM7/4Xz0nXrHSeuEXLUkM3E6+ROL X-Received: by 2002:a17:906:1603:b0:6ce:362:c938 with SMTP id m3-20020a170906160300b006ce0362c938mr14204332ejd.253.1645408842900; Sun, 20 Feb 2022 18:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645408842; cv=none; d=google.com; s=arc-20160816; b=qljKGn5DpD85YakWxkK009xyh7OQiFsdtYiqZak8drUfq20ktyDkEtYSNKoJx2a2iX Yt8P3alht/ksf4KBy8XpdUPUS3/LCca59bunvRV/9acAPthURg8u6KJHLmQvSBObHHWT aXHZR1+TaRbPtIkR+FlbGvGbxM/btw+J8XNsp1G28/5TP80WOCzLRFt61sHIZQyB5lJh 3omAPzqRWcxXmvYrsUeiKAHgyeY9qMckr5fGKRQyeifX9g4FOpZXRPG8xvvbZmZzNRve L7kVVj07+i3zKUPN/5PFcmT/PRg2J5zmozyO0qWAFjXdq4vxmhH5TKFRIB0i0XLJ5TdU UYcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WeRK7mVO/ecJZAjdMGcQ9y791K4md076KxZvc0YYjTY=; b=oNxew2ICPGA+ht7SjyMPPwRXQE4xvN2o+d+HQdWLjdxRYYkZNXjwKKmodTeWqdDZnE Q5x/egKE1n5h4K1Xnk4nNBu1iGekJRJBK0NwGhQYl+xEyHm/XmSsiPOoWvNs+MxpWox0 QtBM3NvWdLY//fhJ2MFDzEAhV7Bi9+tDYalohGfqht/0EYAE3aktsI5NsEaDFRFjwHrY xwoEp3Cz11zb6GX/UixLY7wbL/ppowRDgAbm1rL497DrBmmSU73SpUU/tgjmzAT/6UKs 19Ig1Wg2V182V8TRMvq6GbLQyRh/aeYE1LAVhEXCp5MGnVGU9lrx2s7xDq7zdBq2gfR9 74Ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw2si9149384ejc.709.2022.02.20.18.00.20; Sun, 20 Feb 2022 18:00:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241786AbiBSJ05 (ORCPT + 99 others); Sat, 19 Feb 2022 04:26:57 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241789AbiBSJ0m (ORCPT ); Sat, 19 Feb 2022 04:26:42 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E20DD24CCE1 for ; Sat, 19 Feb 2022 01:26:23 -0800 (PST) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4K133m30jLzbbb9; Sat, 19 Feb 2022 17:21:56 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Sat, 19 Feb 2022 17:26:21 +0800 From: Miaohe Lin To: CC: , , , Subject: [PATCH 7/9] mm/z3fold: remove redundant list_del_init of zhdr->buddy in z3fold_free Date: Sat, 19 Feb 2022 17:25:31 +0800 Message-ID: <20220219092533.12596-8-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220219092533.12596-1-linmiaohe@huawei.com> References: <20220219092533.12596-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The do_compact_page will do list_del_init(&zhdr->buddy) for us. Remove this extra one to save some possible cpu cycles. Signed-off-by: Miaohe Lin --- mm/z3fold.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index 18a697f6fe32..867c590df027 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -1244,9 +1244,6 @@ static void z3fold_free(struct z3fold_pool *pool, unsigned long handle) return; } if (zhdr->cpu < 0 || !cpu_online(zhdr->cpu)) { - spin_lock(&pool->lock); - list_del_init(&zhdr->buddy); - spin_unlock(&pool->lock); zhdr->cpu = -1; kref_get(&zhdr->refcount); clear_bit(PAGE_CLAIMED, &page->private); -- 2.23.0