From patchwork Sat Jan 14 00:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13101750 Return-Path: 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 5B989C3DA78 for ; Sat, 14 Jan 2023 00:16:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DD0378E0003; Fri, 13 Jan 2023 19:16:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D7FE58E0001; Fri, 13 Jan 2023 19:16:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6EC38E0003; Fri, 13 Jan 2023 19:16:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B7AAF8E0001 for ; Fri, 13 Jan 2023 19:16:30 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 90F6E140838 for ; Sat, 14 Jan 2023 00:16:30 +0000 (UTC) X-FDA: 80351488140.25.7885ADF Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf13.hostedemail.com (Postfix) with ESMTP id 199D12000B for ; Sat, 14 Jan 2023 00:16:28 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=arrSrn4L; spf=pass (imf13.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.44 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673655389; 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=/KjcC4vdn0F8bwHPm7aH8/jU0gejjB6PredV8xmX1m8=; b=QIH8Gyi+8wQdj762L9qGzDLIVCfLkvYuXUT4sqFjJV12UmNTP10lU+VW461t5Fg5QxNNXu sk1Qb16eGRK5NgY4CK8o2hnop9cds0eOKDv5LKLCKDCMP99tMxwK5WA5/73fHsOT9md7tf 8LMbPFAiJvWCouOIZNcMeUaMVAeRzhU= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=arrSrn4L; spf=pass (imf13.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.44 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673655389; a=rsa-sha256; cv=none; b=k0YieJTtwjDd/FHX1/bvqo2W+AzQ6iqIdTLp8zK8s4iTO81LNLvogLquGLmlOVNRWiTsBN +3TFU2HDkyYieFoFGpjIyrb3ESlpwV7yIXBA/CMnbh21xar204yOhnPkPyBxOHgyuhjKMN z95NpWNZaLlmCEy3lSGzt1NTapmWRBg= Received: by mail-pj1-f44.google.com with SMTP id o13so20449430pjg.2 for ; Fri, 13 Jan 2023 16:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/KjcC4vdn0F8bwHPm7aH8/jU0gejjB6PredV8xmX1m8=; b=arrSrn4L+VBsJd77YJD8ctZh/KRnLsYulABJcTjOdPsLbpnHB3YR44IYBDCjYNq1tG 3kqEV2HjQiFgS5hPnM8e8aawAgoxrBDhUsejPDYvPmE8paMVjPiOAbxZGVsipLE0ORKF umVciZnOpsYKRccyQtgnMCi3LYllnDGScc8QmsyFH71obCJGtIhWvmdObv73mUrf05Hv orHDT5xtJjnIXsb+3dGi+z5yDIIfVmP3t9zt7pW2CeaCwx9zRdG1ZKMGEYC2CaPxyzlY VClZOxqKTSbQdPwuVkHoXgR6QpWzTXUxyAUCATUb7wnkrZaPmHSz3BhyfLtutzOd8SDJ sH3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/KjcC4vdn0F8bwHPm7aH8/jU0gejjB6PredV8xmX1m8=; b=lLFbYYrvLzYDF1z5dCAzh3N61Mmaj4BdsnUc3BF1v9Vj6V8jA8T1AiTVJ4QdJJRTot iEf4Uib02R+fqTDYG3N+W2xJZYgxN0QHOQTp1zGscVTH4l3TFiVKfjnD8X69JYnTS+8+ Y7HqN4eGpAFOxQjrDwGtuKD584eU29XhvWAhGmFj3UdTZRIke0fh43R3XQvv8jsJ+9FS 6T2hcHLSUDzIsbaTRyO9xWUWXsNvhYEZD4uq6u9tcIy/k/pBc8lDaPKO+wUH2+YZ3cIp 9QrNxHhxevC6rmh8wZiJAFaAIVxtwFC9x66EeC26O4/f/owTTWQPW+BdiDlsqOZkVjCG 0I4Q== X-Gm-Message-State: AFqh2kosaJJ5l7A0fkCoH8t+1zJbWEFuAPAqpjWKH8q5WVsjhmJI1L95 7URiC+c75y3ODZbSgLHuc3t4j1IVf0M= X-Google-Smtp-Source: AMrXdXu1WR7K6RyKti4hXxLv2+gB+N7RA/seu5IQRIR3O9VXK1EAKlIv6NrvJOxpNkqjKc4NH4o0PQ== X-Received: by 2002:a05:6a21:3944:b0:a3:754c:2769 with SMTP id ac4-20020a056a21394400b000a3754c2769mr96572284pzc.40.1673655387606; Fri, 13 Jan 2023 16:16:27 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::2e58]) by smtp.googlemail.com with ESMTPSA id nl5-20020a17090b384500b0020b21019086sm4064541pjb.3.2023.01.13.16.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 16:16:27 -0800 (PST) From: "Vishal Moola (Oracle)" To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, "Vishal Moola (Oracle)" Subject: [PATCH 1/2] mm/khugepaged: Introduce release_pte_folio() to replace release_pte_page() Date: Fri, 13 Jan 2023 16:15:55 -0800 Message-Id: <20230114001556.43795-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Stat-Signature: uyftq86gx5aeje5mgzdgzaxitufwgi8z X-Rspam-User: X-Rspamd-Queue-Id: 199D12000B X-Rspamd-Server: rspam06 X-HE-Tag: 1673655388-663457 X-HE-Meta: U2FsdGVkX1++Hfk8KDUYsyLJ8+Jz9Iv97rF7ibfjJxYJiITvIYXRpbSbgn1rNY6cSPpTO8ZlC2miXW4JrmRcKNPyINdDJz5Nkvox7ZQ9obwhtfW7+2+H9Etsh+4I0E/Etx0GBBKnLcvI8QdzhPlhJpq5zpytKCm9oxJI2j9ILCnGID0Y7wg3RhmMADF8f65g/uB9alQqGwifcDN1cvcdLLLdkkP60RsQMXsEY8D7verWnSQbF2lql4itiDDbQHzGakqaenFo/nLCI3Yw2BPSjliEIe5bDf0Rd1NF2uOv8IeTpbv/eublvTLWhSSflsxYk+27gCkzXXLjmWvWQbyFlvtda2Fg8KSo41kzG+4H66Vzr/Q/A97UmFl84x5G/nCSGg0/vDAAjhbIzW/vDk7JXzoAuk7qC7LPy+lW30X4Q75LYU7tD/B1jz/2SoudboAljkAnRwGOac4MgNfn4H+H2kRnfAegYWP+yqr812FDlY9CS5UUtpDpH/519kyjISYIs5z7tsqzQpuGz5cD2Jwb/ftN74yPrqgucjVFH1KuNNyBbaSPe+cTYYXEx68pLif8vBGHJ7tVmG+4uY7Gq0aDZ6JI9djdT4nJfNxz+sf7f4ddsQ66YzaPv3zIy2uXfvBpXmmHwosIOOLiyakjyLxS4HwUt3i8A8HExLb8XVUonpfOFmxLQpimpWtYL2x1dJG0TKYhpPIcr1+Ucv3QjoSV+IKTBw94hZO5HUt8Z4d6v6CFLOM/wuYr9HgMZCiynm4DP9fzinB4gZEuletXvtd24SHZU5KVikN/S7Uar2vZ33mNBP50bR+iVRWe7RzzEXnMPPgl1X8QAdrnYeeGRICJ2c9RwIhwf8UNy3/tm5AcIGeupUBiyjANYnJxOfSijA/aj9ud0GjlwaaztaDMIXEubtzSMkNTf9/aNINwHhJxhOcmQ0uDs5iVsHniE6WtmGlo61CXD/xjT2T90kG9tyR LupjWuks LjWfg4XeWiQCjHCY1kR8zmhOO15fUi1T7EfYLxJ6ipbL0F7AzFMvgbK4tmRMs83Crbd6p8Fhk4jjAj1mEO2gODGGQ2Cz29Nvfk8cMxXXqaXJSdrzTVAidWW28U8A0/iMVDFDmoD+LufHNLqyCaSxVqlNpTLrcDkOwVFR7HEsFbrf/jwUBd0iWuKkrXUhM9yyFVVzNmbe67wFl/1LqDjNvwSUNk+KUTeozE3SUtpn1eRCir4i5YzS7YB7vJx/bK4Rk+2hqctSnAYObndG1Xss5xe4VYg== 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: release_pte_page() is converted to be a wrapper for release_pte_folio() to help facilitate the khugepaged conversion to folios. This replaces 3 calls to compound_head() with 1, and saves 85 bytes of kernel text. Signed-off-by: Vishal Moola (Oracle) --- mm/khugepaged.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index e1c7c1f357ef..4888e8688401 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -492,13 +492,18 @@ void __khugepaged_exit(struct mm_struct *mm) } } +static void release_pte_folio(struct folio *folio) +{ + node_stat_mod_folio(folio, + NR_ISOLATED_ANON + folio_is_file_lru(folio), + -folio_nr_pages(folio)); + folio_unlock(folio); + folio_putback_lru(folio); +} + static void release_pte_page(struct page *page) { - mod_node_page_state(page_pgdat(page), - NR_ISOLATED_ANON + page_is_file_lru(page), - -compound_nr(page)); - unlock_page(page); - putback_lru_page(page); + release_pte_folio(page_folio(page)); } static void release_pte_pages(pte_t *pte, pte_t *_pte, From patchwork Sat Jan 14 00:15:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13101751 Return-Path: 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 53DE7C54EBE for ; Sat, 14 Jan 2023 00:16:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D82CA8E0005; Fri, 13 Jan 2023 19:16:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D327F8E0001; Fri, 13 Jan 2023 19:16:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BF9968E0005; Fri, 13 Jan 2023 19:16:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id AF42E8E0001 for ; Fri, 13 Jan 2023 19:16:31 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8C55E40AB5 for ; Sat, 14 Jan 2023 00:16:31 +0000 (UTC) X-FDA: 80351488182.21.B819334 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf26.hostedemail.com (Postfix) with ESMTP id E4C8C14000C for ; Sat, 14 Jan 2023 00:16:29 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=P3XFIbjS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673655390; 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:in-reply-to:references:references:dkim-signature; bh=R11gpIsoLjoJPx/bJDZSX3qFzcN1YPIoVj3Kg++9jRA=; b=XsDKJ+TIjXdnRs25UGB3WXLly8/tt5oQCxIzKszT3UTZ6ugwGkL6hfpUHnl9SpoeP6YANq rYYKBE9Sjrj3YYHJYHRGUc3wqsP+zIhKabvaYiZBTcJdQ5OlEti/06RUPBijDUQI+c4rhI OKV8p7Hu7CbNp3fwKttKYhxgH40GLyI= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=P3XFIbjS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf26.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.216.45 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673655390; a=rsa-sha256; cv=none; b=m6GYdiFemTdpAOg/M2sBe161WRKWQGeZwpkVDK9ZCbl2TXdvfVLw5WEcIEhZGDwXfdnXmB iwTqP2yoOsY2l7bzrXk9t2Pf74cmcKWRE67DRtVTshqiUMYfTD+wgJh4PffetoKMrsUWDz I2jT6aDkvBVQdsjxcZ0mlIhLGA5jaQk= Received: by mail-pj1-f45.google.com with SMTP id u1-20020a17090a450100b0022936a63a21so2070053pjg.4 for ; Fri, 13 Jan 2023 16:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R11gpIsoLjoJPx/bJDZSX3qFzcN1YPIoVj3Kg++9jRA=; b=P3XFIbjS9O2iFLNHs9KwE1VQ8werQuyrNARUhLmH0lCVNRZJ2rk7sgZT+Zn/CV3aO9 n8NosQbbujPD1yTLzY2UtT/orCnuHWy7JhAv4QCSPiGNheHs2ZNcWCweXjNj0NCFqodH Xz2SipLoimvA1UTBTssbm8XWZ8xtLfiLHZwIdk9wyWIUkEEnyVwoQOahZlGWgFgcbv1v vdMyCUandgKkyl6eDOY3ntLLrn6MzeGGOX03JuITzAcChJZuNGQh9FnQ05DZoIPVVoeT fH3iJEksq5Dz+dM+HeaMJPuXGVstuBYeICD8N7ANsSkrBqLXmgyUzhVmF9vR2+cf6V9N DOKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R11gpIsoLjoJPx/bJDZSX3qFzcN1YPIoVj3Kg++9jRA=; b=SJseBR1Rn0e30+zkS3zgRd8gvNKMTQ3E74YNwVpiv/KvrTiNourRN1cKaii3itp614 7sPyb7zTPqWjY2MiQWW8PAZtC2Cuge58E4uZFbliwMOtru4BKR5Ae0aHRpHX1ZXXixdB fi3Raq7iPyX+gBSE3uOOWQPwlPfTfKULvkVO5/daen4azdaQSO+pru3p7faP496rcbCl zUes2N1Ipr/ifV37QjZW16rUMX3/Hol6wzCiQbaAJoLi8sQ6HmM5ZblgUkDU0o+pbWdx BR6pUzLPkrIdndiKpeb6fM42SEODfZBhUCVyls58aVLHNjt7TFC4Zwot0PGryKVCKrMO AGbA== X-Gm-Message-State: AFqh2kqns76maKc7iUIS7EoE2Vetwhk+Gh68XUVHJ+iGZyM/hemWcV1B 5b/femZstNGsx7Z00PfF9TbJ+vQ3DwU= X-Google-Smtp-Source: AMrXdXuuoqgSVenxCxLXxH+0fhWynqRedNaei9TXcehDD/NR+Z5Pd9hEF7ldxqIfPwbvyTb/zrcE3g== X-Received: by 2002:a05:6a20:43a2:b0:b6:71f6:a4c0 with SMTP id i34-20020a056a2043a200b000b671f6a4c0mr9808650pzl.1.1673655388607; Fri, 13 Jan 2023 16:16:28 -0800 (PST) Received: from fedora.hsd1.ca.comcast.net ([2601:644:8002:1c20::2e58]) by smtp.googlemail.com with ESMTPSA id nl5-20020a17090b384500b0020b21019086sm4064541pjb.3.2023.01.13.16.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 16:16:28 -0800 (PST) From: "Vishal Moola (Oracle)" To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, "Vishal Moola (Oracle)" Subject: [PATCH 2/2] mm/khugepaged: Convert release_pte_pages() to use folios Date: Fri, 13 Jan 2023 16:15:56 -0800 Message-Id: <20230114001556.43795-2-vishal.moola@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230114001556.43795-1-vishal.moola@gmail.com> References: <20230114001556.43795-1-vishal.moola@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: E4C8C14000C X-Stat-Signature: m4smtdrg9zqnpgubdoehywxsbsqhbdoe X-HE-Tag: 1673655389-667194 X-HE-Meta: U2FsdGVkX1/nr8vYWKxRtuflEO2+cZgI6wnOJNuJqMali+pB9itX4B7Cp5wkF7ZlTkRPLgmhaIYAno4nzEqIifRwkZEwJdsWzmkKwCKYM2Dgr5qEshCenCdA61Q+wUFu0IRr70tavY2HVEPF3BYT84rcSy0dj7+9eqGmv+vxWwgvNnwkRfWC+y7FdfAw80MmJ1FG+OUEDv2602flu068w8kteAYuRkWNY19FrOdHeIE040M2sknY+M8EqMoOPX5sNAT71UIVgpyw0BeO/BgSBgrvC6THI8VwMSkW86tRhTdlrfiQic0zgOMpvg8zJ0xGcI7XdbUSSkHkcB9jUXKdSiFD0J61FhLC02keCU+G+i7ha0PnNhL9WyRyyTiEsZajbmilBI2qdjbzurGeZXqhCAThflu4y3zQsk2GQi1ItpCx8F+dtsj7Fkr03sLLWSg8tMMw/JcMLxxAT/SuOc6ZuUdaQnO6+1bsI+hojHVWATmOlAwomMRfWrqCwhq0U46L7tDpN0vKf1VG1n3TqqEI4Wj5uixvlqAgducWdpMZX47u4LzrkLIqlQuXoqYJSClGnuKw6AIyeXtgcDlPW5IiV19N19+YU4YjMidjGTrpXCUIHTbYnipY5YRmEp3jDAWRuZGbTzdqc+1hNElcLoTkdYcGUhoQSVXV8AISgc9hPYi4zQXSuxq+i3yEaIHB8DCW3lQGXtuO7pjiQ83Cr40O7IAn2NahVCjzYYnZWaaOLFi+nI0KGDUT0ekjj9eR9Cob5Kktj089xIxzgtZoEQNg2HA8btpV75l76dbRpBXweBM0K2NwgC/Dh77HgETr5Sgnlm4fZMRHb5MXCqMUl+q8fMSDCVvT4cS0z6n2u5l5LHSFE6/q4lLYtlmCaDsbuBHQS8uwHYEooJ7YWcDws+NtljeligW22nYPNqHad2nzDm+2n4N5xkhkNgXMxAA6b5qozDDBqR6347NkmjeLyri /alKvdDu TK/x7koX1mc5Fmm4FFPnjLu3ktViSN1201gj4JMODJiPc0u5GThMK6JH46Z0Ire5LJjP01+F4Avh+GP69GrTgAY2zxR/qVI79C870mdXBaVOwHN53bwfAzUyKztjwD3oGAlJnp98ZmCXbDs8bLAycTv0PcqZtYWJvnvH2cickTtTJysPUOV4f/WtU5xyKcTGqeWShRxyqjZieJzMdYdnxtFuP6uYyQjayh3N+qXFd7fkku7CDArmcrwv6qnN73/oWwTQFCaQnwiKXkkY3yWXcEX0Pkw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000296, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Converts release_pte_pages() to use folios instead of pages. Signed-off-by: Vishal Moola (Oracle) --- mm/khugepaged.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 4888e8688401..27d010431ece 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -509,20 +509,20 @@ static void release_pte_page(struct page *page) static void release_pte_pages(pte_t *pte, pte_t *_pte, struct list_head *compound_pagelist) { - struct page *page, *tmp; + struct folio *folio, *tmp; while (--_pte >= pte) { pte_t pteval = *_pte; - page = pte_page(pteval); + folio = pfn_folio(pte_pfn(pteval)); if (!pte_none(pteval) && !is_zero_pfn(pte_pfn(pteval)) && - !PageCompound(page)) - release_pte_page(page); + !folio_test_large(folio)) + release_pte_folio(folio); } - list_for_each_entry_safe(page, tmp, compound_pagelist, lru) { - list_del(&page->lru); - release_pte_page(page); + list_for_each_entry_safe(folio, tmp, compound_pagelist, lru) { + list_del(&folio->lru); + release_pte_folio(folio); } }