Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp978534lqp; Fri, 22 Mar 2024 01:34:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZ+pami/yMon+RHSEt3b92nlHshCUZCMeOAZjHE8demletOXh50tkn/LIA4Z40efLGdhumXWh1zCYFU10354dksEXZBGrH2eurifqskQ== X-Google-Smtp-Source: AGHT+IHVhT28giB8Qd8s3lyvQY4/CCNboB5a7tCwh1XdjfrUT6bqnTXMelFm4r2Fc31jobjsLw/d X-Received: by 2002:a25:8391:0:b0:dc6:238e:d766 with SMTP id t17-20020a258391000000b00dc6238ed766mr1479586ybk.2.1711096482188; Fri, 22 Mar 2024 01:34:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711096482; cv=pass; d=google.com; s=arc-20160816; b=07JqvmIKWInRLtO8tkjGHxOPuvbIJm79kE9Lrt+BsaIC8lMY03CIlOOrsxSwx35HlF UJfphmrVdbJtsesK1egkT4rpQeG5q/rcGdsIrozNlRz5F/MJoWEzcaujB9PSFCDSkX0a XJaE2o90YshcptyKE5FiHtO8dFnZJqCG9Yic/nWRioOJ8a6Nr4EJXRN0mVoYB9n2uynx DVtefuJiex97HU6VWtTJvx9ZVRsCYPCdgBFnDruoY+9Stl4FsY2yO8masnIlwOMKbJBr 7lgVE9fQVqcn6TQ3BoPO0VfvROLAD2UYHwgVEdyzZyCGARTEFnehc2gv3esxKdtOdw/u O+2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=LQHEjvQohIhYmfR3WZ0QKNZGoTw2C3rDph8+ldFVCMQ=; fh=pSVm912ddvUDMmTgSYZ2mvqcr71r3veA/LbeSI6ZXgA=; b=j9qaAQmD2+Ia9eDca+YwcspT2b6fQ+rCvWwXmUgsogsWOVnEprwLYuGskf0SWvB1Hu hOnJcMhTP0q0Sr0a+CkITODdpaNh6tFJB9GYPO8wdwIKDC876SpsDnrQDErbdKI2Wcz8 7Q3SORf25RPtb/cT7YQu1fZkwmZKsVeOjHaZgVIZPnv1WjbbwUHqIqEw5WeaolLG4I9z d+WaMIF4neN0TY41JA+DN+E7Na59WCknqmspdrU787JPTCW0z0T9B92O1RAZYReS+zri fRvimZeGwB/BVdXtcz937uiX/jiK7UNSYPUto+u8ZUZBXbX2GfAkgMTHtQOjaU2bpIHD ituA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rYcGa9mX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d19-20020ac85d93000000b00430c15494edsi1463235qtx.790.2024.03.22.01.34.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 01:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rYcGa9mX; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-111129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E2FD01C21915 for ; Fri, 22 Mar 2024 08:34:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94A2118EB2; Fri, 22 Mar 2024 08:34:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rYcGa9mX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB65E18057 for ; Fri, 22 Mar 2024 08:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711096471; cv=none; b=T99+LDTtBlgFlTX4y8lzDwM1GdFfuuvk+YqRn79qIpi8t2hqwASleHKde5BYIkCW7LilpIEO/29eNXWTgNsMhK0V6o97WRGrJa4Y68PdLIjcb37KulRb9CJwuw94sADhggfQPEyesuOkpviXZ4yDUP2J72e05wH87ZfXN5Cg0bc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711096471; c=relaxed/simple; bh=BZayepR+CEi8yM6DRRgla9ll3e+zD9FmiqFSA2KVg2o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kU2+dJFRBBmiRZnwnAzQDfcmPik9psn3dz+fsxUu6R3qvMEYlHUxyyAFBICuHz9yFFu0XZRSQOD7AEMy14pIrHfSTE81QyR9Q6U7SULjJDWYLDBI19VCjQjSR5HbNjQvXqqUojPFzOWcd7JFP4eMx0CL9Xc12CsMuXlAaQ2GCh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rYcGa9mX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7149FC433C7; Fri, 22 Mar 2024 08:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711096471; bh=BZayepR+CEi8yM6DRRgla9ll3e+zD9FmiqFSA2KVg2o=; h=From:To:Cc:Subject:Date:From; b=rYcGa9mX0yTT/evSVfcg2Z33lFIs/T8RcTG+wJT277HuOklkjHAVjCt7clvy1ZPRa 3JbgDAIiJw8wxtBaxTfcAvy0TCk08LiBSwczpBPGyaJgUI47cMgbDgkEW8gCpaRHIA cxD+4fnrZGgYx+fGrC39afObm9Xwm00bpziVLi7BLZVrygda9zQTMGyf9ZnT8P2xhU cFE28HYo+TH29j2F/bZqkEsZbTzQGtbCH0bg0zp1y9hVkQVqUMONN0+XvC8b8E88CN mO8DMf8LxVjDgU8+4eQvWtxg0sZC9l3QkYf6/7d9P1Xjxnsq5ll3HtrD7Zwlr+1Tnh AmjinawuKgB1w== From: alexs@kernel.org To: Matthew Wilcox , Andrea Arcangeli , Izik Eidus , david@redhat.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: "Alex Shi (tencent)" Subject: [PATCH v2 00/14] transfer page to folio in KSM Date: Fri, 22 Mar 2024 16:36:47 +0800 Message-ID: <20240322083703.232364-1-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Alex Shi (tencent)" 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 81kbytes from 2570760 bytes on latest akpm/mm-stable branch with CONFIG_DEBUG_VM enabled. Alex Shi (tencent) (14): 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 folio mm/ksm: Convert stable_tree_insert to use folio mm/ksm: Convert stable_tree_search to use folio mm/ksm: return folio for chain series funcs mm/ksm: remove get_ksm_page and related info mm/ksm: use folio_set_stable_node in try_to_merge_one_page mm/ksm: remove set_page_stable_node mm/ksm.c | 259 ++++++++++++++++++++++++++------------------------- mm/migrate.c | 2 +- 2 files changed, 131 insertions(+), 130 deletions(-) -- 2.43.0