From patchwork Sun Feb 4 12:54:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhongkun He X-Patchwork-Id: 13544661 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE385C48286 for ; Sun, 4 Feb 2024 12:54:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 103746B0071; Sun, 4 Feb 2024 07:54:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B4516B0072; Sun, 4 Feb 2024 07:54:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE4C16B0074; Sun, 4 Feb 2024 07:54:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DEC246B0071 for ; Sun, 4 Feb 2024 07:54:31 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id AA9B3A0696 for ; Sun, 4 Feb 2024 12:54:31 +0000 (UTC) X-FDA: 81754115142.28.1E378BB Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by imf08.hostedemail.com (Postfix) with ESMTP id 22A4816000A for ; Sun, 4 Feb 2024 12:54:27 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=TWw5SbGZ; spf=pass (imf08.hostedemail.com: domain of hezhongkun.hzk@bytedance.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=hezhongkun.hzk@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707051269; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=5tAC4bTgcHhyuinc/GPvD04sELvx94YbTxerqzMu8Bg=; b=qidaQ60qASBrAuQFFUgsxHZ9j6qsgSRHTpAfjyhKg17x+bcvjIZz2r/XT0knlgf/DceJur 1GfFQbDvJ3v0es2CsgnwC6LA4OAy72Ebk8wTHNQb2603SYW2RZyOMe8Jwn8OfzmjyPl5uo ffgfndEttiWbO7gFqwhY9qb5JSqIbw0= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b=TWw5SbGZ; spf=pass (imf08.hostedemail.com: domain of hezhongkun.hzk@bytedance.com designates 209.85.214.169 as permitted sender) smtp.mailfrom=hezhongkun.hzk@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707051269; a=rsa-sha256; cv=none; b=AZ3+AH1tuZIcbiztoJ0GBFV+67CREZkE4hCZtg94JIEAZUHjZntCBkBkBosKyqMeYAzCCQ H8/aRnFonm2M5htAbXnLYDMPNBxKWQAeZ15t5Uo7qQnT9sbuo76V9ROl9loNbrZCznr4o3 Yn3nTjBAab4LTBEr9dAnFJPBul5DAr8= Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d953fa3286so24474485ad.2 for ; Sun, 04 Feb 2024 04:54:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1707051267; x=1707656067; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5tAC4bTgcHhyuinc/GPvD04sELvx94YbTxerqzMu8Bg=; b=TWw5SbGZbGgX1b6j/Hej7Q2WGXsllDOYQf5o6XgrFNcDl70UYANxPksWvpv+zBv93I LG9vcdbzIWcShJz1kRLR2bvCnYiHzBUn2j4V7X3hVM6aopQW7zRU+mq9W00dLjjyLB0c v4m3ZT2wbErEYzfnX3hiNcfbhlj6VI3gx5P+7b4zbpV2tTQEfgXrfsV4juM4THkyXVsc icvrXwas1y7LhO0kIZ9O5uAyV5oHODdPchlONfJ5LCGxxl2TaFPzYZAQ4G1b+V0RFAOO jFjGtuSmEP2NnLbq0leEztvhnAwufb5f7zOOz0mbUmlK7aF9veHqtO05iWqDXf0TpzrB eG4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707051267; x=1707656067; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5tAC4bTgcHhyuinc/GPvD04sELvx94YbTxerqzMu8Bg=; b=vxvT+rqTM6T85j+X39f333CKvBvuRFPzSJFahUCNqLqCeT3KZyM1Z0axxoaqTushUF FchKrN8KQpjuv21+DWyHsriJRRqLEvNeat9UFr5YHTkuzIQDEIq0gr+Xzb19R3Fm9Qg7 udFmJeBAQQ/NyDx/eYB1hdO6HjHlxXx8WHbCCXmmVa/tG9YD+cLgxjwN8I0ug6uxqtvb eG1Dgzbz7DnwA6ZHzbrxiZZLbAAImw4pCO2XWP5v3+KTFjIJC+RnyJ8lok3mf9c1Ofl9 4ulcZBeUjZ6KOImno8U/cIclwR62hHz5xbv2Ju+k9EsWF8huPOdwiNvSEqhWYf2XZOiG 8nwg== X-Gm-Message-State: AOJu0Yw8mmr20dILOJu037a8fTuH2FwOsxnrvNbxLEqXKfo8C4Tn8VyU /B5TSCpzqsrwqVT/czWXTbpmDrQwXyWwQVOxL05s6cLEkvjhA/1RuaLbbbEfnK3ORhVRnF/+vHV G X-Google-Smtp-Source: AGHT+IGlXfGyxxKUEnIlqEAr/CCBYz0TEKQOucz6PHY5Wetp8CrFWgyvvXpwSUAohf1uq2WCNuXvwQ== X-Received: by 2002:a17:903:2b04:b0:1d9:7ab0:5e20 with SMTP id mc4-20020a1709032b0400b001d97ab05e20mr7448141plb.69.1707051266767; Sun, 04 Feb 2024 04:54:26 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCU2P3M441IKo3m94kcEIRyLqmQoSjqPXpbfoHeFX+kaEVe4IRHlE8e+6vNrp+rtriUX5uoFL4D/zFlmli9GWz2GA6Qu0KZAYzDd+wVjQHfqcSdN/dUzNO/esBTcZdhfUbYFVkrjYBMeufya Received: from n37-034-248.byted.org ([180.184.51.70]) by smtp.gmail.com with ESMTPSA id pt12-20020a17090b3d0c00b002968824041dsm900193pjb.5.2024.02.04.04.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 04:54:26 -0800 (PST) From: Zhongkun He To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Zhongkun He Subject: [PATCH] mm/z3fold: remove unneeded spinlock Date: Sun, 4 Feb 2024 20:54:04 +0800 Message-Id: <20240204125404.2112384-1-hezhongkun.hzk@bytedance.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 22A4816000A X-Rspam-User: X-Stat-Signature: qwuij143xejwn9ubd353y8t6qcqawitu X-Rspamd-Server: rspam01 X-HE-Tag: 1707051267-663023 X-HE-Meta: U2FsdGVkX197ZlhLgG8+iXI1+d6EE5F+2PqBimvpvqDUhnpEHE8FboEXoCQHUBlipHY/s61pZl7vuS6yXGcsETGxIP/PdNGwf+1r+5mCZEvzzVbYiBnxjfU3ELeeGgXvyVLtt/Lkh+ZOwl+TgEnuuW5wzQnNf4/+4H/Dwx69stox5kghvLRDjxbCN4iuHoBhN6nJU5WgGFzirD7hwif5kJWmPfDtAqUGQeWhxxuRkmXH6J6RM+jL21fkvmcDA24Z+sfaHHTJ+AWvUceXl0IzFcpvg9wrhvL423DFH6U6cqNYK7HEKKP+M6Gv7Wn1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NqgEZUqITtVb1tNM8iCnWnB3pjInUaFGg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000014, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: There is no need to use spinlock in this section, so remove it. Signed-off-by: Zhongkun He --- mm/z3fold.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index 7c76b396b74c..7f608c0667f3 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -442,8 +442,6 @@ static void __release_z3fold_page(struct z3fold_header *zhdr, bool locked) WARN_ON(!list_empty(&zhdr->buddy)); set_bit(PAGE_STALE, &page->private); clear_bit(NEEDS_COMPACTING, &page->private); - spin_lock(&pool->lock); - spin_unlock(&pool->lock); if (locked) z3fold_page_unlock(zhdr);