Message ID | 20240531081230.310128-1-ying.huang@intel.com (mailing list archive) |
---|---|
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 1F884C25B75 for <linux-mm@archiver.kernel.org>; Fri, 31 May 2024 08:12:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77D2D6B0088; Fri, 31 May 2024 04:12:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 72CE36B0089; Fri, 31 May 2024 04:12:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F5786B008A; Fri, 31 May 2024 04:12:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 40B446B0088 for <linux-mm@kvack.org>; Fri, 31 May 2024 04:12:59 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id BB3EE161274 for <linux-mm@kvack.org>; Fri, 31 May 2024 08:12:58 +0000 (UTC) X-FDA: 82177975236.11.9281CD9 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by imf18.hostedemail.com (Postfix) with ESMTP id 3998D1C000A for <linux-mm@kvack.org>; Fri, 31 May 2024 08:12:55 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=RGNGYPoT; spf=pass (imf18.hostedemail.com: domain of ying.huang@intel.com designates 192.198.163.10 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717143176; 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=PPwrYAIZ5zTOlCJr6Ho4lNo3rSzJxAxHic9x6bIOlds=; b=VEk03Ka/a2R0Bw1s4LNMe0O3JovJQTppsp+gifUI1EXI0SelPmDj9NAZ+vBffpxVnmPipi x9odPNebebC+I7KUQm1A1hKDQVee5cNkmjaeLiuJ3vTeHYbVCjxpR0Y8yPk+CDEpLhP2Gd YWjbnFtORrxTmDL6YTX234QNlsfJ5R4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717143176; a=rsa-sha256; cv=none; b=o/4GRvRotJC8SVbSsK+SifJZYAz+VR9+ePHLd2V4v8S/9akvvIpLYqSXzVxrUQ3XaiFcKJ RcAocJh7FrFhaDE15W+qFoOhFwdhtTLAZlWi3KhXfEfzoS1s5gPuFw8b417n8RdOBp1J6I ZT1nDAzTf7rs/53xl8537S8a95qlRYM= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=RGNGYPoT; spf=pass (imf18.hostedemail.com: domain of ying.huang@intel.com designates 192.198.163.10 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717143176; x=1748679176; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=+HL84eWGAxnOcQGlr/4MbeLb2An0y1RSJRklCBfMaL8=; b=RGNGYPoT+LI4yvBRHN8pc99qxAqUppirfuQLW//qA8qVmJGpgWqsdya4 ml0JPXWvSV6PVa1F6s6WQeG8zxhRyb+1Y9GujSgOxuSpCl64RItPjJCzC yPGYBb88RbdcmrSZ6GeFHNzCNow0S61p44L4qmAjsL3h7RUkF2Uc238D0 Rj0RNBhWkS5MzsZgkR5g8HfC+fxAJstz2vRAZMnG/rtfzY+g4VbaaqLDI 5lmT2RCGsfdYfDVabR+an2ajou+Bph44sGqDkJw3BIMJfOJJlsWDl7dDb YzJeY8T1budRwykPQjyAg8+8RgGYEMtoYGqr/dXfkL4rpLtOaFoVzMoSD Q==; X-CSE-ConnectionGUID: Cp/SSvVVQdeKmqatyuyHcw== X-CSE-MsgGUID: nS07bxDtQeWk3+EkY5L5iQ== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="25079728" X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="25079728" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 01:12:54 -0700 X-CSE-ConnectionGUID: GDugZUomRcCClg2XooWNuA== X-CSE-MsgGUID: r3kK+LwIRb+g4NR6Ws7B1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,203,1712646000"; d="scan'208";a="59270914" Received: from unknown (HELO yhuang6-mobl2.ccr.corp.intel.com) ([10.255.30.35]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 May 2024 01:12:50 -0700 From: Huang Ying <ying.huang@intel.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Huang Ying" <ying.huang@intel.com>, Hugh Dickins <hughd@google.com>, Alistair Popple <apopple@nvidia.com>, Anshuman Khandual <anshuman.khandual@arm.com>, David Hildenbrand <david@redhat.com>, Mel Gorman <mgorman@techsingularity.net>, Miaohe Lin <linmiaohe@huawei.com>, Minchan Kim <minchan@kernel.org>, Ryan Roberts <ryan.roberts@arm.com>, Yang Shi <shy828301@gmail.com>, Yu Zhao <yuzhao@google.com>, Kairui Song <kasong@tencent.com>, Barry Song <v-songbaohua@oppo.com>, Chris Li <chrisl@kernel.org>, Yosry Ahmed <yosryahmed@google.com> Subject: [PATCH 0/3] mm,swap: cleanup VMA based swap readahead window calculation Date: Fri, 31 May 2024 16:12:27 +0800 Message-Id: <20240531081230.310128-1-ying.huang@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: je7yqtuanc61yrmwbe7r6qcmmk3s4w6p X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3998D1C000A X-HE-Tag: 1717143175-218061 X-HE-Meta: U2FsdGVkX1/FuLlGU8n16QSTLiTiObMq/wTJ10bTG8sEN3OUempOei9nwaiCeGSuGdoEKGFbCFiPc4E+Q++bzhypbHtqB60aIZPKXMC6v+I1uFQggp1b8tWZov3Tu/lrM5fIhRtw0P3K215hd56HgqmYGxC+jlCaC/dcZKyqF/v3CAngwXSmFMM2o+hFU7Q12nKk6BOsjxfkzKgHb5v5ryPlVbU3VPaiHrypYeSvGTL5h6zJ5YLPU9jvw8OdyOwFwSn59pJP+aNhDaxs1U8hnzaEw4tSr958aM4Jc4T9jgkxFNp1u02kzkVJAehwHe0OqfWYpaipVibJytEkAZRDzqqRWoqpAZGahnGdI0vG8T1o0YDvMJm9f+SjGgvsHVRHdOjLrU0KDrJ7kQO3Qdr1rISCZXGeE/TFE3P7r0pvWPTca8AQD7Urv07WUZ4rSuac19csVbVOP7gzLsWddIn+/OIyfLH6R5vnNrW0F6zoqbo0D8gyuE9EsdKFWkwQmpyx5MVEds4oQB1NhBFhhJWI3lcxK3gQxuAByY0Cya9jKZH0sFjKtB0Gop9NM8kvOUmmKdMYhPHwtQh5fZOA9e2ZH4HFA4GZqp63y6d0Ss35mHJvBBvsT27Eum2Ii+NWOFZzvQQQCKUR2DI10jKtEJUE6lSqyv88RHBxTP0AHvjCUQQ7c2cdDkGtXL9mF0MpzAwOLoMrmxO3o+k6bkwVQ9eUHR0qlFXw6iEz2/7lsVLHIBPosSFyVouf3QIHIn2w0IeE0ko3ryu1oCYU9x7wUEiZmuyEEItVKrb+bSYKb/iKMzFFkbxKKdtqrrI5FWKnc7LAehcWwm0/QFaSp2MAyJK5LtBSbjIeC6Eoqt0/0uDgXs9ietWNW+czxqVlFZR28Q7ZFRyuzYLrGbYC4BG+onwqsP5IkxZHlaSemRoUxxj5v2T/gYerqxP3mhFaZPA1JErX7c1hx/nWC6W7RJMSXXd Nr3mQfjI Z3xYZeTFTQthhhaNFhXpfnzuobfW8pB3SDlsmRMBeF/A4kFaSEtv77WY1ItbjIXq49Eh3dZNdah0/6TG3pyZqFkUkuoM0EAnYAeSZ6b7R6bauzx6Uuu3317xAnosCT7135Px0ZinOlfv7sZEXzTU6BDS/kw== 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: cleanup VMA based swap readahead window calculation
|
expand
|
From: "Huang Ying" <ying.huang@intel.com> When VMA based swap readahead is introduced in commit ec560175c0b6 ("mm, swap: VMA based swap readahead"), "struct vma_swap_readahead" is defined to describe the readahead window. Because we wanted to save the PTE entries in the struct at that time. But after commit 4f8fcf4ced0b ("mm/swap: swap_vma_readahead() do the pte_offset_map()"), we no longer save PTE entries in the struct. The size of the struct becomes so small, that it's better to use the fields of the struct directly. This can simplify the code to improve the code readability. The line number of source code reduces too. A theoretical underflow issue and some related code cleanup is done in the series too. Best Regards, Huang, Ying