Message ID | 20240417160842.76665-4-ryncsn@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 E6336C4345F for <linux-mm@archiver.kernel.org>; Wed, 17 Apr 2024 16:09:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5EBB46B0093; Wed, 17 Apr 2024 12:09:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59C376B0095; Wed, 17 Apr 2024 12:09:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 463CF6B0098; Wed, 17 Apr 2024 12:09:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 26E2C6B0093 for <linux-mm@kvack.org>; Wed, 17 Apr 2024 12:09:56 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DE06E120D03 for <linux-mm@kvack.org>; Wed, 17 Apr 2024 16:09:55 +0000 (UTC) X-FDA: 82019509950.16.D3B5652 Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by imf01.hostedemail.com (Postfix) with ESMTP id 0C30840014 for <linux-mm@kvack.org>; Wed, 17 Apr 2024 16:09:53 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="fIuEqIg/"; spf=pass (imf01.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.166.174 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713370194; h=from:from:sender:reply-to: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:in-reply-to:references:references:dkim-signature; bh=ccxP7TY1LZd03lAzTUSjd/WMiiw2l1TFGZjibmTvaRo=; b=hGZPnHwWikZd+xzRo/p0/IkneLyk2BBA/MYpSPlOcivtRkz1WJZGfJuhZMK4LtPr401DI+ nJqy3+2m3ZV2kYELd5WFDPX2riQ9GrzGRPU1vcT/E+8GPAa/eD41OhAP+0ym2tYvP1JABs ZJ3Kmduq0ulxuEoa31xP0wPyl6Btq9c= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="fIuEqIg/"; spf=pass (imf01.hostedemail.com: domain of ryncsn@gmail.com designates 209.85.166.174 as permitted sender) smtp.mailfrom=ryncsn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713370194; a=rsa-sha256; cv=none; b=AchK6e/7x0fx9AVc8H4UCkZOvf4SjhBjNrpeqkVrDx/K62tv+WQz/jUkDULOYhxtjAipmY fRXEAyX76iXwQrBWwoZtOvqxqYJeFC9Hl/YhrOUcl9BAVoX/v4/WkiDaA1On3RV+sX8b1t dEiFCVehqpcXOs7vGGQvM4SqFUuxkdk= Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-36b38a2288aso2556455ab.0 for <linux-mm@kvack.org>; Wed, 17 Apr 2024 09:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713370192; x=1713974992; darn=kvack.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ccxP7TY1LZd03lAzTUSjd/WMiiw2l1TFGZjibmTvaRo=; b=fIuEqIg/Jv0GjsbI5i2p0b5f5CuqEQnIFaStS7hTArfsO8ibrVRfSWrl/zkeKBQqUg Wwil46YEUBH5j2oFDStJKhM/PYb4OMt2pb0wI7IXMKoCNGoO8i3WIg6fFS4UTQtsFIrI b5YPmwrwifgYynOK3s/roKfA5A1gBLLyxVRUzc03sN8KS/o1A/6DuIPig17caVASi73V kuT44o8bPvHAYf5aE4cFPmcUOhhxK/4BbVXuEXLJRDlJkq3CUYur7OLMz8FpT/3J+vko c7guJJemye1WhJR4qsCMTZDBHZZNdTTnoMuFi8+wBe3w9Vc/AUGI/vlpI6NvtLsV3tnn leCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713370192; x=1713974992; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ccxP7TY1LZd03lAzTUSjd/WMiiw2l1TFGZjibmTvaRo=; b=OsSNNynTmNZ1CgfN8GHIYSpQB/mMvvekSKMW1f3vKl4gmvLcJOrYNbPg0o49FOqtIn JO11ZlpBCpVp2NRv/aziaqGrSxNm2Hz8SQ2Hxo0o8FFbqmlnbkFBySSD7EkBPkVFqIIg Ze1CWcOvYNG6Y9J1JKLyWOu5P7XkUP5ekC4Xg84x+GGMXcqhjnZ8Iw/XvCtqTqEqCIvi 8J+ZmLs497NGBvJC5jgaM+lThfubqAj5wqydZf5qsNtyaOwTokkYITdaAFTKWaJ2rvoF JCJN3yTD/1kV9aQ/AbcgMkPonQrgIwmJaT/joVUxTDZKgnMjdgmD2hIzi6qUeyUJBgX6 9QlA== X-Gm-Message-State: AOJu0Yw9R9BykM1lZLWXlEcs1/Ro4Fbr64jYFSOVlfMkHq4es1onCobn vEcYrnqGZUmibdyfDZKDzoRNhs54SDiCFbPro8T7YclTZfAWV8S5UwxN/ICv6gWI/Q== X-Google-Smtp-Source: AGHT+IEpyaQ2B9laiL5Qz3xq+OgAsfHl508IHieRw4jQK+zsxfoW9aDncD8KQfXYdlyhnJK/CywmIw== X-Received: by 2002:a05:6e02:12e1:b0:36a:1e27:1708 with SMTP id l1-20020a056e0212e100b0036a1e271708mr18563457iln.25.1713370192373; Wed, 17 Apr 2024 09:09:52 -0700 (PDT) Received: from KASONG-MB2.tencent.com ([115.171.40.106]) by smtp.gmail.com with ESMTPSA id h189-20020a6383c6000000b005f75cf4db92sm5708366pge.82.2024.04.17.09.09.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 17 Apr 2024 09:09:50 -0700 (PDT) From: Kairui Song <ryncsn@gmail.com> To: linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, "Huang, Ying" <ying.huang@intel.com>, Matthew Wilcox <willy@infradead.org>, Chris Li <chrisl@kernel.org>, Barry Song <v-songbaohua@oppo.com>, Ryan Roberts <ryan.roberts@arm.com>, Neil Brown <neilb@suse.de>, Minchan Kim <minchan@kernel.org>, Hugh Dickins <hughd@google.com>, David Hildenbrand <david@redhat.com>, Yosry Ahmed <yosryahmed@google.com>, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kairui Song <kasong@tencent.com>, Chao Yu <chao@kernel.org>, Jaegeuk Kim <jaegeuk@kernel.org>, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH 3/8] f2fs: drop usage of page_index Date: Thu, 18 Apr 2024 00:08:37 +0800 Message-ID: <20240417160842.76665-4-ryncsn@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240417160842.76665-1-ryncsn@gmail.com> References: <20240417160842.76665-1-ryncsn@gmail.com> Reply-To: Kairui Song <kasong@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: 81qjkuoijogkpuakfjtybqx38st8bxmf X-Rspamd-Queue-Id: 0C30840014 X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1713370193-221536 X-HE-Meta: U2FsdG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uPlcEg3RvwSfvXGtCIlJEyR+iJzkfrpemDpS3EUNqwfhwvb48gl5qHC0gnjNKfuTR+7JxDH1ww3GwGzMWRBtMav0ScIDHpwz/UlpG9Lro2T0ttVsL0c0v3iicOFY3ocqwxljn8ZH6DdmZxjSF9yiI/27ssTZm7pbautT9rSbeQLgb6UeRx5P/A3lY4lKOoNOlja/dnY4/G9UGtFT0Rgj8QR7+uVUKSDF/qB0frIb+ds/ap1EjMe47YFpXOx8OSo/kKyAOzQ4GnC28vXekCKIcVLK2XGesTiVHeTx0FXOJdzUmlUJaAY2qMFmom1NgYJA1xkb96BOMw2SMdcgNDLxn1oO1FNo3YZqusgF6blzINo6slTr8EwPDQ/rmKf5DL99HPCLX1E2hZBPua8D5HXLMB+Unwl/vFjt1JKGljW+X7MMEw+CpHJJ7T6FF+DN8BN80X1B1L9v3sFpQne6gjdKQlA80C0ZHTdzhLmMIxnHW9DepsjShPKWh6PF+iE8N9DND8JY6SP28KZTmRJENyaJE6qRQeAEgb+0iwsHgxp8O0wIcb56x7B+CMr8xjpV+UbL6swupwD+7grRaZWmEhqTr0iPUnkqq/60KLmlcvaxto5FoS/2XX3KjwBoC9dzKhY6+pABoOLs8NbSQBDlLNUSt9Vf3IjW X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
mm/swap: optimize swap cache search space
|
expand
|
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index d9494b5fc7c1..12d5bbd18755 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2057,7 +2057,7 @@ static int f2fs_read_single_page(struct inode *inode, struct page *page, sector_t block_nr; int ret = 0; - block_in_file = (sector_t)page_index(page); + block_in_file = (sector_t)page->index; last_block = block_in_file + nr_pages; last_block_in_file = bytes_to_blks(inode, f2fs_readpage_limit(inode) + blocksize - 1); @@ -4086,8 +4086,7 @@ void f2fs_clear_page_cache_dirty_tag(struct page *page) unsigned long flags; xa_lock_irqsave(&mapping->i_pages, flags); - __xa_clear_mark(&mapping->i_pages, page_index(page), - PAGECACHE_TAG_DIRTY); + __xa_clear_mark(&mapping->i_pages, page->index, PAGECACHE_TAG_DIRTY); xa_unlock_irqrestore(&mapping->i_pages, flags); }