Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1701256rwb; Fri, 13 Jan 2023 16:35:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXvTUbC+PTs9ig0qudVCECQSiT3kbQhXe8dtBXsA1IPPGkTjErPuqTqxR+9grmPsUIHnzBZ1 X-Received: by 2002:a17:902:7294:b0:194:3cef:31 with SMTP id d20-20020a170902729400b001943cef0031mr15853463pll.49.1673656523189; Fri, 13 Jan 2023 16:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673656523; cv=none; d=google.com; s=arc-20160816; b=OXHhPRf72fulc0krc0B2az+c/bWEnKb5VWTVNAClC39slb1CGyEWz8UGQ9pOl+7vOT CSnobHhqRrtbLbtN+HHYb7MIQMt3rQb9+u8b17AY3dLO/8SmaTqehfopygcbo5MppRpL IoSIPBf+VjaOhHY57I0v2WXnkg0Ip6j+0o65azmgqo8pNGgZyfjwZvJC50qWyQB/XDR3 gT8jz7UvSZnIJWxyrQtvNDU53jQBE1618BAE9dy/lYMNC8E/ydOOnFS5rawhNKSE1403 TE0V50a5+uEk3UKEO9uEGxV0fh9+VdvMigsyLvHHZskVgsiBDn5Fkmu6GFjdPy/zM9cY K4tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=R11gpIsoLjoJPx/bJDZSX3qFzcN1YPIoVj3Kg++9jRA=; b=gFPhYbidcpREL5j6OJ+I+V2oCcSkXSy0vx4tT28yKPwlwU7uF0E1Yd5knuGsBwXoAg wWD2giA+QdpoQCPWUxRaPHoImh5kvlXm9gUuJauZIwiSnL874Mb7BBQyGILneUZthU83 O7sMP1DhKWgF5k9MK2YJhVr9e12mi+xnIgsZDq9xdH4aAatLqDlZTJp7KAW+ltUzIDKb ld/L0BR1f3I8TWNVyluDjmDbihy4CKO1ghZkUudAC6Ql7uqABnsjS2FKU4zmChrpPdGa MTNOjaaEGANokODfigoJzJpSWStbqGq+KNgF6sms8P4A/qSQMK4hq8qi9s/GKDvFyFtQ CARQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P3XFIbjS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a170902bd0700b0019296d177a9si21200389pls.138.2023.01.13.16.35.16; Fri, 13 Jan 2023 16:35:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P3XFIbjS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231322AbjANAQi (ORCPT + 53 others); Fri, 13 Jan 2023 19:16:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231142AbjANAQb (ORCPT ); Fri, 13 Jan 2023 19:16:31 -0500 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19DBD26F1 for ; Fri, 13 Jan 2023 16:16:29 -0800 (PST) Received: by mail-pl1-x62b.google.com with SMTP id d9so24997105pll.9 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=aZGpfvk/wkE8tbmR0j/PO34m9DeBixGDuBL4lPdE7C2ju8WkUkj3wECnUzJIgpuC+D k3jDx7w+izq/EXuPSGQG12bja8Kff22hE/Vr0l+Pk/gU2no+tmYXXvMexTBdvNsJ2VSi WQ043haAMvFiovc0iK545+cJmGTmPoQLgeLU4301JNtvF+AXPt6uZ5AAmg3y6ImRJzjA rCLa9KErIbxVPWujtd2ctuex3lELuZPCpmlxbgeMCANhhUi9LxjSCMffNaapk2+Ejryq fWf0HW2bBdwaLIChCXjComdsOw7lH/KepOkpvSP4MYhrFxkwFWGz9KqKsNQUCWkMnK+W KTSQ== X-Gm-Message-State: AFqh2krqx7Bgv21W7KlrwCmO1khlDOBmzojKvlc2x+vfFDca6u7QMV5J Qii7dmVgs2fEzA5zuO4IxlY= 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } } -- 2.38.1