From patchwork Sun Feb 4 13:15:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhongkun He X-Patchwork-Id: 13544676 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 BB065C48286 for ; Sun, 4 Feb 2024 13:15:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 164EF6B0078; Sun, 4 Feb 2024 08:15:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 115496B007B; Sun, 4 Feb 2024 08:15:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F1EEB6B007D; Sun, 4 Feb 2024 08:15:54 -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 D54226B0078 for ; Sun, 4 Feb 2024 08:15:54 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9EBC41A072D for ; Sun, 4 Feb 2024 13:15:54 +0000 (UTC) X-FDA: 81754169028.12.8F7BEBC Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf13.hostedemail.com (Postfix) with ESMTP id 470292001D for ; Sun, 4 Feb 2024 13:15:52 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b="euA/hQfI"; spf=pass (imf13.hostedemail.com: domain of hezhongkun.hzk@bytedance.com designates 209.85.214.171 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=1707052553; 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=KDHl5eErxuDobQVbtXvvZ9sXwo6TG6BM1N84o1QfNHo=; b=endjY8Po6YrZZO0udc2uiSn4Fcfxi+YfIIwmqq8/ZuEuRPytci/vVlbw/UsaFcTId3PcDG Is1qYoM/5LioW3RJtOmVYfr6ImJXM5aZFZT92UYsXBFmg2dWAhloRQhZJ2soTfxQzZ2gVS 7zWv0Zwt1APGGqsc648b+M9DZe5NGKY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707052553; a=rsa-sha256; cv=none; b=WFSd2yZ0tjFpbaBfnA4UvjEdgNbnasYfb/B8Fn3r6UWc+uOg+omqvIiLp+pSw0Ik7h+8k2 cO6hdYiSSqOa3r2EA3UyUcp74yisMnUuklTJPGwSnzFzR9ZdIVaDBfyjRjSJHd0Rwlj6Me 1eQTM0SKeX5JTo9ctlfnV6dL6D6RT2g= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=bytedance.com header.s=google header.b="euA/hQfI"; spf=pass (imf13.hostedemail.com: domain of hezhongkun.hzk@bytedance.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=hezhongkun.hzk@bytedance.com; dmarc=pass (policy=quarantine) header.from=bytedance.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d944e8f367so27931925ad.0 for ; Sun, 04 Feb 2024 05:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1707052551; x=1707657351; 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=KDHl5eErxuDobQVbtXvvZ9sXwo6TG6BM1N84o1QfNHo=; b=euA/hQfIxZJdbwbbswexrEkWOGx4591xgIQM7Y9kBmXORgoseg7ks6ar5Q0UtKf2hl 3v0eemzoz6cZ+NvnDRWFGdRAqLHswwfY5+eZ7Af0SpmBo7ZbOjqTAqn2+UI/ja9zq4aL +BL5sZoogBLzn1Rk9cMt2esZzVKkUCKONaXwY+lrgM7HCQ5nFXUwbwmvdnqw5tddM1Ey VabzOJxqcUIZQywe8NUWfAuJd6gj696BYCQGSAyR/3LMbK2gV5oEH0Y+VtbvMJF5tElx yGJ27gs3N2CP4+osajA1+CrUnj73l/L8k3tPdYXUZhBImR7aHDQin+IN6r1hPxdGQM2d 331g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707052551; x=1707657351; 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=KDHl5eErxuDobQVbtXvvZ9sXwo6TG6BM1N84o1QfNHo=; b=P+N3Vw0lCZDGeTcASEnmVK4s60C5Em59m5hedrpbn3arj9fXfbJU619M2LDnVFYIFA RmyjonC055LX1BMBNCKemWYRlb8MWHCHRvCFog70/byn0hjAxLY4/78j1cohWH64Edqp Iy6DxpIM3uUcGUGjzjs4TAw4ynusNK1hbmZZ1BvcCdWtLwYSgQIwwEdEidGK24BD5/sG VsPZZYNMXYDYayueBRA3Xr1BxXWe+I5fEqdAfBRc0G/T4X3k4ei7NJfJL3HrxVEZyzhe c/WphmTQqgs742GWNtS63zJ4SWhd+SOxV6P9S48KeqIXbk6uebehb6ocBLrwDMQVTfw3 +Vqw== X-Gm-Message-State: AOJu0YxF5t76W7LguArUp2D9KdFbbXlDS8Y3mxkATmR2HwFhDCZhRD3z TmS39tNzVif4lrEc/ejKZKWLrjLNFiQXvBDUNiWtxgPieMhT/V/s5kgAgBGpMjs= X-Google-Smtp-Source: AGHT+IEwhdGSkdUXGAFJ/31bfda+rXugA9sth6bkUk1/arLPOW68uZkxSpZnKcRSUulQ1kEqH4xDOA== X-Received: by 2002:a17:903:248:b0:1d9:657c:2769 with SMTP id j8-20020a170903024800b001d9657c2769mr10026749plh.19.1707052550827; Sun, 04 Feb 2024 05:15:50 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVFCwK/dfeBPmh2w8VaYWfymQywz6pilcJFFxMoRiFLYJ6pMnAIt2907NfHD8fxAauI17F/0T4rxG804fnQe1bhw2V9pQatbAr6YtQ4 Received: from Tower.bytedance.net ([203.208.167.152]) by smtp.gmail.com with ESMTPSA id u11-20020a170903308b00b001d71a0b1109sm4555683plc.116.2024.02.04.05.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 05:15:50 -0800 (PST) From: Zhongkun He To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, Zhongkun He Subject: [PATCH] mm/z3fold:remove unneeded spinlock in z3fold_alloc Date: Sun, 4 Feb 2024 21:15:43 +0800 Message-Id: <20240204131543.1469661-1-hezhongkun.hzk@bytedance.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 470292001D X-Rspam-User: X-Stat-Signature: 37noghpo9kyjjnmsofbsqfhy5qzkcogp X-Rspamd-Server: rspam03 X-HE-Tag: 1707052552-140777 X-HE-Meta: U2FsdGVkX1/UEpZd7UuIXOi+BiBRL1b8TxZwtMNZqKuzT9lDX8iEDLYi+HFCxCOIxtE59jPUHKOIu6QtOnDkxBveRWSIFzoIWcv4f53j/ncTBRCWooHFua6665Wr9UqTMfZITLbeEzTTMVcEy1ZVAwqOqqG79OAPJu+yu5cwnEysWVE9vzfLRNN25sgei1uzN/jSLQdtj+LVlWn0DbffdOCwhLH7bNzbvZmpTRWh01U/cO0YPfCVsJvPT1iKYfs6qAQQagNkujC35vTN9PI1TqjAEkQUZIcpMN+CCio5IOm+GwVkhMu9dWoukuAWNwFjZXl3LwqF0g5SsTOPGf5nbDEhrB55+EBtGtCRo4JxKmg2xY+E0qg6FFjeK3rFIKa4Y4yVwa3IGR5UngxCPpYdyz+XGikP2i4dOLwUCYD84Z5x+INCQ/mo22ZvLk9ejIpXMJgRbOFB5XdVQ+QNfmIwkGhAicDXIRdOeBS5cymIrlTtVutVSVkeIf7CJm8eoyqRQ0nK9lwtTErhCu16GrWHP0NbsLOIUKhl0OXEp7pNaOAF0DPaCKzkaknGdR/ztew0hOBBk/Q3iWZZLBz/yZGI4vQtYkdi0wC2Bc0JlYqVrs2dzBJsIWWFSS3mtbAbx8sR9z2ehk4Oj1kHNu0xy+k9k9wF1JP+3ZW0WYDcHCXSMlKV/am7nzVaDmf2e6fgNYW1P0MlFDhqgTW+o+xUUOave+/T7tleRsif6b3tv5BITj20Gl2la8zEQw5PhdFQ9ZpSRtVd8X/z+eyhUo1mq1m889zIVL6GFGvSP6KXXUpmBqbVtTa0fnST5S1vETEcmnu9g9q1Aohbmxg/6//hiKMaqROF3mWt+rqGC6ryOB63vdbtj0780YcqWaQr+EMu2lWpubY4lvRFQzswA87fd/dyswnUFCObIick8G4vaMcmse58kdt5mCnt/Nm2wRwGQ7b6C6F4ghlObHG9w/ASssk WwOzrmtQ GdYjXazleN0Gd3GiKs0qfR480RtVrWLGBg4KKwDY1v94Pmhzh80wSmBtPRJz+OUAJo5Wdpvd1Vy6kDvovY3gcZbrQHn/54kZO//cAL+D9S5Xcv8Z4cEo97Fid+AQ77sGZPxmu+hx1peG5HL2nhQXIWWmMGzAPJZm2NqcxASFa907p3d/BhdoJKvPrQQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.001311, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The spinklock in z3fold_alloc() is used to protect page->lru, but now it was removed in commit 'e774a7bc7f0ad', so remove the spinlock too. 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 7f608c0667f3..58946cacbfbb 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -1068,9 +1068,7 @@ static int z3fold_alloc(struct z3fold_pool *pool, size_t size, gfp_t gfp, add_to_unbuddied(pool, zhdr); headless: - spin_lock(&pool->lock); *handle = encode_handle(zhdr, bud); - spin_unlock(&pool->lock); if (bud != HEADLESS) z3fold_page_unlock(zhdr);