From patchwork Mon Oct 16 20:05:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13424035 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 CCEFCCDB465 for ; Mon, 16 Oct 2023 20:06:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 505E48D00BE; Mon, 16 Oct 2023 16:06:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 498F88D00BA; Mon, 16 Oct 2023 16:06:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 32FBC8D00BE; Mon, 16 Oct 2023 16:06:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1FDF98D00BA for ; Mon, 16 Oct 2023 16:06:59 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id B0883C0C18 for ; Mon, 16 Oct 2023 20:06:58 +0000 (UTC) X-FDA: 81352408116.16.3FE404C Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by imf09.hostedemail.com (Postfix) with ESMTP id E7CEC140018 for ; Mon, 16 Oct 2023 20:06:56 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=lrSvijUi; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.215.181 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=1697486817; 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=5F7OC++xn+kkTY71IkQWnoFxTqqatmRbWWQxi/FzcJo=; b=09adUV6wA2Y++l65wYxNPJbDpVNT97603NyaOVLUiewzoSXgspGI6V9o39DwmKX6UtJbdq rrHEcEnMRPY70BxSlAViX3y2nE8/kNJg5FEUXMpY/0OUC6BHJMgnjLbY86TRO2/JSgN1yd YXSVRDJ53G1XNjtzlMVi4soiv8l0Gsw= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=lrSvijUi; spf=pass (imf09.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.215.181 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=1697486817; a=rsa-sha256; cv=none; b=XrmPrluUfWzJvAmG2Qyt4WrdAQsx3xkCaNmmvslbEdGN/kcMxBkK1tGXEIjFuEKq/rf+O9 jOpkpZPdTSa2GqJYia0vXZRXUbDjkXY1gWHZrveKRFxPX0nYo4JPRkMJvLLA0dMGkqGuu+ v+zJem82ll+iTdPil7NH5FYjk7GYO44= Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5a9bc2ec556so2261085a12.0 for ; Mon, 16 Oct 2023 13:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697486815; x=1698091615; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=5F7OC++xn+kkTY71IkQWnoFxTqqatmRbWWQxi/FzcJo=; b=lrSvijUit1qtq7j8cLBIvDlpObw3qup693RqsQFHqRFnFZdAXlX9BIszV+hl6mdrug suL2MxFy+pqH6slkKuSt2QC920AowizKlQyxl0Fo58iE5A3FgRdIiEz0QRbRxVVOTfHV ICCJSTkb9djVQnsOA37WHup95zxqk152fv5eVyz1jDcfDMwlZg8sggwTGR69lk2M2uvF d+OOR323I0xQRzrvYoay3b+S1cO2QT7t9dVj+KLgtVRY9K28Lja32FAxM1dOjQiSc6df ElR63tuX1T2sKheNP1ouFyEeG07/McY1tZXFbfd+1KROhMeDM58Jfleb1McBY1tr8ceE Hh2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697486815; x=1698091615; 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=5F7OC++xn+kkTY71IkQWnoFxTqqatmRbWWQxi/FzcJo=; b=hDPTtzTruU/I0t2XParRdpwG7kFppcB4npLUV5fonIBKvteIYGyhiMA0EredjQIPle jr7LSDT2FV7NvrEmoFLlnUUWYci/16kaGRXEhx+Ec41hLRlAqBSS4Oz4WqXVo5UVmClk nlDjoG6y7va6uuuSVLsz0xkjpzh0uoRaxvhwcCHKOVpBrv0Vh+3RecEZ8MJWD3Q+SFTO QsZbnjjhiN6AK5Yzt59AkEomewFmRwfbB4wt0gIKLAr2sXP/ZDZ8o/G15z1WmO9Qp6R/ GEPHCCHr6aoRxfuWyATwrN7L34fIEc6gPqXJuUXz2XBMKOtqdlBuMoY8PwCwxOEUXDpq dndA== X-Gm-Message-State: AOJu0YyO+v8uVvTR8gZc91PFOYk6YRCbT3tereKGvYgmwZjKUpP3ZcHb nzjfMErEpW3/KWOY0ujfmsVk7WRPXbo= X-Google-Smtp-Source: AGHT+IHRe/04l7y/WWAAnARrrDNmRIvsMR57xoWNqeU+M4PHMsebtC+kDe7i3+rbZZ1zLcbUFsuD8Q== X-Received: by 2002:a17:90b:528d:b0:268:1355:b03e with SMTP id si13-20020a17090b528d00b002681355b03emr176566pjb.38.1697486815380; Mon, 16 Oct 2023 13:06:55 -0700 (PDT) Received: from fedora.. (c-73-170-51-167.hsd1.ca.comcast.net. [73.170.51.167]) by smtp.googlemail.com with ESMTPSA id t16-20020a17090b019000b002772faee740sm5162367pjs.5.2023.10.16.13.06.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:06:54 -0700 (PDT) From: "Vishal Moola (Oracle)" To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, shy828301@gmail.com, "Vishal Moola (Oracle)" Subject: [PATCH 0/5] Some khugepaged folio conversions Date: Mon, 16 Oct 2023 13:05:05 -0700 Message-Id: <20231016200510.7387-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: E7CEC140018 X-Rspam-User: X-Stat-Signature: oaspz1nbdagarqynjno6sky1u95r8bqo X-Rspamd-Server: rspam01 X-HE-Tag: 1697486816-380516 X-HE-Meta: U2FsdGVkX1/hGU9BX2Lr1GG0N9YkemMd6G2iY29Us7dlqOb8cLO7GYwemaErRqjcRETTFs+thPQSNWLwhjtswkAd4GyL25MkzYzc0vn0/KOTDh6MJVpmvMqenJZwm3spQIqStjuvxdAs+ht1ZuAsQqgfl3EBRewPyih8Jb0ojwd5aHOtukGaF4BY41piJJo4pUdeIddu+2NOZK6+kZO9BK2GhOw7IwvmB8kLGjEdJaInEgR+DdnaJWGYz0XOvhn/n9fkSuK52kYBnpGt33IhLQ9CN5dvCJiwMcOWHWqCKKmjV9sD1vqeaJxGy9WWfmf6jJ5DclKZ55mkprsayAqPbl5HVAYYWwmQjssMM09Z7pS2lnFfsKW/TU4Jd1wSlXSdxWShBCvTlz5F8/1NJTnFmZMbbZmup7hC/JxxyNYC4sB2I8fBR1We2fnjTNOrr7zOfqM9pw7hTYjxiV+BZWM0FPgY1JIW29G3FyAg3eOjSvMMr56rSGPErj8BOroSODuksoaO+ML1gjq3CKrvoRXZ6lrNr3S9/d2uPH4Dip1TPC2aOn60TMISiL7Dba5FMkZbcNOCY//D0mKIWVegaL/Qt1nQSUNZxANfoXdg2043phWWsE99sYbc0+NP9rd7tOVdepcx3mP9cm2+MZOug8fWNo7+PQSdHhfpqqSWlYd1cgTiBlHbxCFVEb0swVFACBVstf6ehlNUOSr9QYNFAtzxKE+X0TawfoSwrTTs6cTON0+aTu7BBa00kJ0pLRiYkr+qJkkJ0qCtjnr/qr8S6jOit0HPoHmY1QnKMtm5Zxg2q6zUO+Zx9ipuNW34MwVf2WE9L8OonEjAmV1U0DKr+WAO1l02Ke3YnZhkUFtUyJmxzoQBDUXm/q76aMqAw6EYMLYz2ih5dpxvn2fDgfbARGrQP9peqSbXxSzbkoERnOlbCjqTVBZN8LEs9lg/DROpp7oe0Jv78jnyp8dUIzaGt95 +cZLzIrE 9/eb2JHWVXpTtP+qqtblTOR7gi9kG5K7WFDJdfgnqwPKmOk2qEB1cKiX4S4JlxocE2OwmsIxGg7OZfjgzx/eJX3yxog4POtxsPUZnwzXQ1PImiJAqjs8jdYmw0nlgwW0h/vH4m0bEP5zFYB+FvSSzzEGKTBxCjgDeF14DkFb20iIlj8HjRnAqH+Eh08ydU08/bWkLnyaI82ouPA3yJolmI4SmlYNDxRlLkM/+yi5S80jtAw6mal7AfOsipfRG3fHNjR2riLHtvji7bckm18xPcNbDgAXCdcgftZ75g2aYZdrjQKGNDGZTxtG8nxaRjApXD0S5SSnotf4002LuEQmKTfH86P4Vri7vlaAXfQH5z1pYfLUEu//Lwf83p1zzYONTiNEEIs+XBdCZAGpjlzv6p3Mtzm1KiyHceQ1G+RECedjMmHkIC7mwbyQO29hLTD0j10RQlrX3nUTXuoPlY+7ruxfTdQo7yqwn6ioAp5W7xFjitYKfmzvrP8zcw4cXxfz9GwQeqGPPbsjJCBY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000573, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patchset converts a number of functions to use folios. This cleans up some khugepaged code and removes a large number of hidden compound_head() calls. --- The first 2 patches break khugepaged max_ptes_shared selftests as the functions now use folio_estimated_sharers() instead of page_mapcount(). This is expected, although I'm uncertain as to whether that's actually a bad thing or not. Some performance testing/feedback would be appreciated on that front. Vishal Moola (Oracle) (5): mm/khugepaged: Convert __collapse_huge_page_isolate() to use folios mm/khugepaged: Convert hpage_collapse_scan_pmd() to use folios mm/khugepaged: Convert is_refcount_suitable() to use folios mm/khugepaged: Convert alloc_charge_hpage() to use folios mm/khugepaged: Convert collapse_pte_mapped_thp() to use folios mm/khugepaged.c | 145 +++++++++++++++++++++++------------------------- 1 file changed, 69 insertions(+), 76 deletions(-)