Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1364009lqj; Mon, 3 Jun 2024 21:25:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfI1RGwG+UEe8QBYH6WX8taRx+bb9thJ10WKuyAChy7zjdPtvnkzmiwE2lQcNzU1XA3YtWMiyuEdtsJYjCAcLaXBUzJHYK8HZEpz+zlw== X-Google-Smtp-Source: AGHT+IHZL9dFWteXtcb/KKxEofE+PqhQ+hir7gevxSGh75O3QQG6HRy66izWXTBidI4RKFENASsk X-Received: by 2002:a05:6a20:244e:b0:1af:cfcd:a72f with SMTP id adf61e73a8af0-1b26f1c50b3mr12127322637.21.1717475125274; Mon, 03 Jun 2024 21:25:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717475125; cv=pass; d=google.com; s=arc-20160816; b=GAvdLqy/dU2ON1ot8JLehh+Skx2teefRajqkJbqOmx5xJdRd/sDqd/pAOARUJ5m78U HCcF1guGfO+TSVQxgyOIiUWyCfNgzWqRMkZGjXzUksLGDT0pQZwGRpO94PhbYActMOiu wRYnPi4/dQu2DbZe2Vm3UtNOXW35DIW+Kt/bVF42chP88owOj1ilC1XwFTPgM+9Jy6/e 9QAy4ZS5ZcVz6Xef6vtJE349PFEO6KNYaJN9PKPFU/qRK+mWCKrmfFM6/K3wCz6ujcGF joJahQ1OPV69fQh53KY0MdfY1S5cczlgr+m9yrL+x3xo5BI0aEPNSpkI7RuMR29k9Tmr 98bw== 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=yQVhcs7phxLi9XFnQ6bqLciIXvgxkKKJ73UF/BoYhY0=; fh=8klvRVDD56yFrB+N2y9E7zuvf70XnrIgM6sxOhtJUBc=; b=w7tVptoJymhQhiphaBYSZAjKgxYp0Mow8moGwLgrhFk6XlIJEXzPZWxoHr4T3vUHq5 +1VBl5hn9oZ/z6I+2odKFo9faUZTUqtV+wDsu+FqmapfXqyv0SCD7hJC8HHCOC8D35zx E2WnaSpovJmM5qaZATE8YEULEJC9+HkVHmTPxeVt2G52+Km+3cw4apA7FekunwNOn206 ZSQUHuUE33uc0qAYv0v8hOfh9w7oaezxHVpbEpB5J4MpqHpVGTFEysi6s9larSCSZ+4h qrFZHBV16AycTYjtNB7Nwrz4ebHaKuNe8LV821dLMB+kThMFhDhQ2zUAoFd36QLv9TQc BbCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UpVI0MWG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200004-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200004-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6323dd568si74956735ad.242.2024.06.03.21.25.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 21:25:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200004-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UpVI0MWG; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200004-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200004-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 768A2B23CD5 for ; Tue, 4 Jun 2024 04:21:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8168313D511; Tue, 4 Jun 2024 04:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UpVI0MWG" 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 A523E8C1D for ; Tue, 4 Jun 2024 04:21:32 +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=1717474892; cv=none; b=CB54V1Peu3C1ioIaF1HIsng/tYUrWplwhuH+TKSnvjqBaUNtjWXAyZw8WYnSzfcLmegNf4OKGq8D/GeqEADuZ8DymjP5Mi89zte4kNUd1XB5uhcPdiG/BBZl8qINZBfTjP3c1JfuOmu+HJozTbPLlBIszfoIYJFVWuF5WmPz/ss= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717474892; c=relaxed/simple; bh=WB96U8psVIt6mbqurUhHZdffu9nyfOCHtJ4CLQlAbng=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YbQGH1Bh0NzPKstiyW+QKtstDY4m9lA+st03G8HsqCy5xPGEGZJdXxdEaHorysOioF7foFyMUiEd1oI6cM/Ea2S/qj0IsDNih86zi7F2h529+OKbF3/dw34ji0omoBDFN4+wRn2lALmP7+14idDPxNCS57Hf/y6mLBD3BZF60wE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UpVI0MWG; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E65FDC2BBFC; Tue, 4 Jun 2024 04:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717474892; bh=WB96U8psVIt6mbqurUhHZdffu9nyfOCHtJ4CLQlAbng=; h=From:To:Cc:Subject:Date:From; b=UpVI0MWGFrpsXplgU/n2fwK4ELaQ+xo8GHRLZJJzpQiGlCsZ3Am8B/S5R1OhvYTqE qS0bo2QQMWm+bFkuKkvJV3WZRhYPQ5fjr34Q/7UWqc3Y0Ud2ZdCTXa4ezziGs5JyLg ZwwwDAlJC/0fsMkdWh+fDA3xeX+grM2aPQO02UKjzYO0c5j0Hp0lmsymA/lT2t2T8L w4H8ygWBW4dWEMlAkb2QX3RmhavUlH5yvA2Wvju42JJ4aVxk3diICbR6+XO/gQA0Zv 0Rrew7nzYrgVeO39VBYc1Aal+LAlTKMNG/gwsYYF2dyrcpXS92ssxJ+mzUKktRWUex kSDDbQHAR0Ang== From: alexs@kernel.org To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, izik.eidus@ravellosystems.com, willy@infradead.org, aarcange@redhat.com, chrisw@sous-sol.org, hughd@google.com, david@redhat.com Cc: "Alex Shi (tencent)" Subject: [PATCH 00/10] use folio in ksm Date: Tue, 4 Jun 2024 12:24:42 +0800 Message-ID: <20240604042454.2012091-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 2nd part to use folio in ksm, it saves 82kbytes in ksm.o and passed all ksm testcases in kselftest. KSM still split same folios to single page if they are good to be KSM, but will skip the rest subpage checking if a folio couldn't suit for ksm. Alex Shi (tencent) (10): mm/ksm: reduce the flush action for ksm merging page mm/ksm: skip subpages of compound pages mm/ksm: use folio in try_to_merge_one_page mm/ksm: add identical_folio func mm/ksm: use folio in stable_tree_search mm/ksm: remove page_stable_node mm/ksm: use folio in unstable_tree_search_insert mm/ksm: use folio in try_to_merge_xx serie funcs mm/ksm: calc_checksum for folio m/ksm: use folio in ksm scan path include/linux/mm.h | 17 ++++ mm/ksm.c | 230 +++++++++++++++++++++++---------------------- 2 files changed, 135 insertions(+), 112 deletions(-) -- 2.43.0