Message ID | 20240409092826.1733637-1-alexs@kernel.org (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 095CDC67861 for <linux-mm@archiver.kernel.org>; Tue, 9 Apr 2024 09:25:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F6EE6B0089; Tue, 9 Apr 2024 05:25:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 880006B008C; Tue, 9 Apr 2024 05:25:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7213A6B0092; Tue, 9 Apr 2024 05:25:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 544906B0089 for <linux-mm@kvack.org>; Tue, 9 Apr 2024 05:25:22 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D3DA8A0890 for <linux-mm@kvack.org>; Tue, 9 Apr 2024 09:25:21 +0000 (UTC) X-FDA: 81989460042.10.B4A026D Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf27.hostedemail.com (Postfix) with ESMTP id C731F4000E for <linux-mm@kvack.org>; Tue, 9 Apr 2024 09:25:19 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=MJek0EN9; spf=pass (imf27.hostedemail.com: domain of alexs@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712654720; 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=p7cnu9WIznwBT4jLOT+wbwwJwW3O/B8XWZP3Hz2fjsI=; b=eiW+kVQWZNfPigQITvLdWy/ySqXgjeeiG+jX8eK5fK1cBcVOlwOLC9EGt7/LbxtXaslggA 1Ntz2cNKRuZRM5vxhVoZpJeIntt5lmwTrWqyMkJRP4DltB2Z8/gCaquAWXehA2YGtahyPf idcQ/cDXFwuiON1mFpdXYQzVKd7YITM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712654720; a=rsa-sha256; cv=none; b=1cHacnyPvVLi1ckEuNsJqINz/J1Vril7tJXvKFoV+6tiBsoN0ej4qN3p/O74d8QJUbubZD rOMgpWFUE4TtEkEYvnXkw20Q3pjZ1ou2pNxnIQQt0cCZvXCvCyed0JnQC0U94AmbaF2I7T pURZPdm4qMREZKBpHbF+cSK0jmksfDs= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=MJek0EN9; spf=pass (imf27.hostedemail.com: domain of alexs@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=alexs@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 1CFD9CE1DF3; Tue, 9 Apr 2024 09:25:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CCB9C433F1; Tue, 9 Apr 2024 09:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712654714; bh=2xDuSu2bZaFbHQfV9u0Wk7X0lwP1q8Cg/dxX29fvekw=; h=From:To:Cc:Subject:Date:From; b=MJek0EN91l7r5UXMfQ2gaY/SfZ++QWsTWhwAKvlwbJlC/yB8r1Hk0jR4i4ftKjb7y 1wl3UPPxcyEJzXhTBG8UJozzZRuc84XFgfyIReAUrbGJzalyfVnNHhaDzV7mFGUfOF xDXwokd9YPgfIHdcG0w3HqqB2jik7zjpPNuegaG5j6s69HAfT3GKi6R3/aFl4F8t8x 3fc55kQl78et94d09S9b+R3Diq9SuxKnAIGYZ08V+B/mDpBcqakjI0ud5CbzZcmumy GJsrvntx1L51oi+/d64vt9MsloCI2wxe7CMD2U2ZwObAEqJQldYu7gdbTsevzuxCdn A5cS4lJg476ow== From: alexs@kernel.org To: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: "Alex Shi (tencent)" <alexs@kernel.org> Subject: [PATCH v4 0/9] transfer page to folio in KSM Date: Tue, 9 Apr 2024 17:28:15 +0800 Message-ID: <20240409092826.1733637-1-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Stat-Signature: r7gp6yxhp57d6zsb5z18wcbp9hpj39ce X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C731F4000E X-Rspam-User: X-HE-Tag: 1712654719-184534 X-HE-Meta: U2FsdGVkX1+Em4QuSvYmRfgXwqxpl3tCf931XncwqZcwElgtGGAhkld3P4+DE/4ENskY5HAo6zMQwKp145u099bX9YWy/WF0M1UdBpEML8WZDM8wCDIpdWLzlflwh2IzxxFV8Rb7IHjqlN2Zdb+wczg/3mRETXCwoKlAOzmJIvMIJ1MAAOpEaOAml6Wy8o0W3SNomUENMDVi8D10i1oByTE5X9kiBME+yDwWfE+HWKzIq2sq26mMmpYrxWyNzTQJulkYYYkTmsGzXwFKzWMD7wusMq54sakkcCwGQW/1M+pKgkfn+aHAU75qj9cNCXlWnfswjzpueyLKVNM3bygMqy4bHdVVPFBrTS27ATWPDh1eAvgS5wVSsrIs3JDUDLKTvidbsgdefH/fNSIFcLaXE12LYRLGxojZNSpZqe0HpisodAYzVfQHUt2UzZqZJJjknfQ7I7fZED5BaXCkMTpOfKhvzhEOaMTurVvvQAP5hEfs90WxPpMSCpHY+k1VA0v2ghN/T6V40Vcz4TI7Mt88r7ZPS7oEZFVVchC1ediXaJC9QiQeBcKjM7Q1T/PiobbyReWaZjNs8PuyfVBoZrJRw5mEpm4am6PgZuOl4i3NK6oevEZr2t3ByjuS/cUuulmZnRt5il9zsUQBcooS2WJtBIs+isMGOCTrbixAipYGAonOwrFxGnTX9zQk1RbNxsyKpUeijm84+BB7AS93TPliYbbnedB7et7wdqZlFDnfwqDlzn8TPrF8E1yGRrBL5OTUP7wrwAuCnHzfuuL+WiAjg7vMCgW2LDtmo1dycWYR6pVMOtGN8iZwJxDzIpeM6Bd9iQZBpvuNlL5MnVFlp2xI+8P2gIrHi4oVny+ZA6wt+ezyQdIlpZxfIlqZJ3RfDK6WcpqTLce6oXIlHsUBAFnWACl+Szu3+8r6nUoMbz0BCVxoI11lV4+4vkrnXeH7NNqY8GC43AmknUkpeXmV0zU Diq3qyZw fetNij12W7vq1kEXYrrbS1mpKBAS9Z/GaryjJL/ZWqjhTTdqgcUVCEcgpAOLims4m8Pdv2stxW2TPvnb3/Zd5N5RGWF/suMcXrb5OILVShntVALh6OXY0mLOMG/I72At5DAhTalLzcVLa4G+Nq6sooFZIaPB3O4ibTROZx6PgmtXycyV962DjqyibWRH2n8JDAbz6jhcofsGoePK1PhalVaOD0uKvv4mO9aRXokga2wG6x+EqPVKWpl9SJW3j/M9uP0i2ZExVkOA2r2FEPcHGZgClcg== 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 |
transfer page to folio in KSM
|
expand
|
From: "Alex Shi (tencent)" <alexs@kernel.org> This is the first part of page to folio transfer on KSM. Since only single page could be stored in KSM, we could safely transfer stable tree pages to folios. This patchset could reduce ksm.o 57kbytes from 2541776 bytes on latest akpm/mm-stable branch with CONFIG_DEBUG_VM enabled. It pass the KSM testing in LTP and kernel selftest. Thanks for Matthew Wilcox and David Hildenbrand's suggestions and comments! Alex Shi (tencent) (9): mm/ksm: add ksm_get_folio mm/ksm: use folio in remove_rmap_item_from_tree mm/ksm: add folio_set_stable_node mm/ksm: use folio in remove_stable_node mm/ksm: use folio in stable_node_dup mm/ksm: use ksm_get_folio in scan_get_next_rmap_item mm/ksm: use folio in write_protect_page mm/ksm: Convert chain series funcs to use and return folios mm/ksm: replace set_page_stable_node by folio_set_stable_node mm/ksm.c | 263 ++++++++++++++++++++++++++------------------------- mm/migrate.c | 2 +- 2 files changed, 134 insertions(+), 131 deletions(-)