Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1350713lqt; Wed, 20 Mar 2024 00:37:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWh3lab/EZ6aj5cy3hT1T7eTh6z/mimKFaTnoLNgJohfoyJrigZItC8f6idq8203hxrvjNPj0VNoXvszri5OYIQcwLnFoUNUxVr0T5BFQ== X-Google-Smtp-Source: AGHT+IGKM/C0RhbnIAuhxnxD/GW7eeYq22vlKpCtzF+d2cDbxr9M7EcP610Gx8wG8fGfzvwX/ft1 X-Received: by 2002:a05:6402:548e:b0:568:1444:a828 with SMTP id fg14-20020a056402548e00b005681444a828mr11404720edb.37.1710920264380; Wed, 20 Mar 2024 00:37:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710920264; cv=pass; d=google.com; s=arc-20160816; b=xwX+6ntFJmcvj010w1sMR1tbEnI7EwwDowFk6PtaoHalaGiw7tmMrLUsiEBG9TATcD bpVZtJZJY+C6sXFW+xqRYolCjUTC1qH6H98AljHTxhSP0velgqukf1r81I/HqC1Mh0t0 Q9AiRs5bSHWh2w92ts5Vk7CO84tD3ZBSkguZ3pwg/W/nsJfcrgrp43lQn+e41yNWbpe1 NLU4qx6yeZqkOgMV/DAPNnuqMN+ftTogxroKqnYyLCrDauPYFWBfoiJT+vLl4obrg5hW hf2v2UA0cik9n+SCLs5Y93J5QPIdsuSzY7nYp1sv6Cib6ttBrL/P595L/VRgK0MWFnsg rHWg== 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=SAyhoEkSjpDyKBQ6w2+JMi4QtFMsnSdNgz5mIRdYS5M=; fh=79LmpGwhnI6urgX4Fb+cKho/EguWtw7TLmAetV9M58Q=; b=QDSQDtfaSlt/kf1meG/H57rLWs2FMH7bva52NHA6tBPQtVygXvZaI4kUkyHTci1/wG rdzmyYO09iykIKfb3CFcatguE+CIN/c7mW3Z6ER8RiBfJdKsYTMVdelrPB9YNBgIJQfB EaaPruC2dwH9Bk2J7Bw1tMKALNHxrWP0BIGpv98h2bwE36KE2stDEIBiX6OfzXrJvDxl X8pK6bY0tsHy7fFJ6ux9nbDvGjCCASt5rxQo9muBbK7rhI1Tsmjzd1yUQ1bysqmfeF7H VH6d0LXFKzVj5MCTF0CEkHx84JtI+Dye9+A8lBb8BXDi1ApY8Zi4gj+CMnqR80vE/q3O OzNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="r3Gqg2/8"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-108549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b15-20020a056402084f00b0056479742905si6446139edz.599.2024.03.20.00.37.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="r3Gqg2/8"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-108549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108549-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2078B1F2379C for ; Wed, 20 Mar 2024 07:37:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 809932C6B2; Wed, 20 Mar 2024 07:37:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r3Gqg2/8" 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 A37422C683 for ; Wed, 20 Mar 2024 07:37:37 +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=1710920257; cv=none; b=oKHM4mF7/y8l7+gF5z+U14Qt0kJOQjyDOJ18g2sTiW7I5xWEh0J0PiyxyWb+vXGB0dM85QIarazDnvIqLId3nExqrCejCx2zzW3/AMzKce64ZEP+cyB3joiiHR/og3oScDQKU3G24sh3egYDZ0mUkvEwgzK5ta9OhBD1RUNOaow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710920257; c=relaxed/simple; bh=YTMRU0Nf5P5SYGoJuo+TisiaAmlJOWa0iSN0mNp+DiU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=J9rTK4REwrFnTCIDGLbKPKQt2aeqZCzrZXmn0RQv96epSTMNzRw1ejQ68jFpgWaRfAIfQNVx6CNxS1k/nfI/qy1Dc6IA2ji7m69n0zVu7RAqryaBDXs3m0JXMr4F97eTLoRXTlZUQ23LRBIQAat+w/4LlWKapHA+89z7yUcQWSA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r3Gqg2/8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95FEDC433C7; Wed, 20 Mar 2024 07:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710920257; bh=YTMRU0Nf5P5SYGoJuo+TisiaAmlJOWa0iSN0mNp+DiU=; h=From:To:Cc:Subject:Date:From; b=r3Gqg2/8wmLMN5FOuFo7g0GoXHvDzxZy05MxXkftJCg2VDtHDzYUM09zB1nAly1y7 4QQ16V3lFv9MghoR261GCjN3fMWbUwbIauf5mw2yIJRbwtGCXm2YB8QJ8oGFnfeBeC FeT+nwz3aLfydQy8rc0c/QolFkFlaL0f6S3uES1INjEQvKMU3hW8a9xaZ5ZKf8AQTM LUSvMhO1YxdyHiJh2yKylPDgWjDGwLImnW9GP66bc9X99MshxR76ecDnb5O1CXPSF3 AiXtYL9Uj4BNDXmcOLPxrXeyQi4DCDtBE/leqHR7eOxzoGMiGQCiSdt7BbpkAi2X1x zwzFNLEDmF7WQ== From: alexs@kernel.org To: Izik Eidus , Matthew Wilcox , Andrea Arcangeli , Hugh Dickins , Chris Wright , kasong@tencent.com Cc: linux-kernel@vger.kernel.org, "Alex Shi (tencent)" Subject: [PATCH 00/11] transfer page to folio in KSM Date: Wed, 20 Mar 2024 15:40:36 +0800 Message-ID: <20240320074049.4130552-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 size to 2487136 from 2547952 bytes on latest akpm/mm-stable branch with CONFIG_DEBUG_VM enabled. Alex Shi (tencent) (11): mm/ksm: Convert get_ksm_page to return a folio mm/ksm: use a folio in remove_rmap_item_from_tree mm/ksm: use a folio in remove_stable_node mm/ksm: use folio in stable_node_dup mm/ksm: use a folio in scan_get_next_rmap_item func 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: rename get_ksm_page to get_ksm_folio and return type mm/ksm: return folio for chain series funcs mm/ksm.c | 244 +++++++++++++++++++++++++++---------------------------- 1 file changed, 122 insertions(+), 122 deletions(-) -- 2.43.0