From patchwork Wed Oct 18 20:32:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Moola X-Patchwork-Id: 13427839 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 9AD6ACDB482 for ; Wed, 18 Oct 2023 20:33:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D14EC8D018F; Wed, 18 Oct 2023 16:33:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C9EDD8D0016; Wed, 18 Oct 2023 16:33:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B65448D018F; Wed, 18 Oct 2023 16:33:09 -0400 (EDT) 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 A6BC38D0016 for ; Wed, 18 Oct 2023 16:33:09 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6E703120EAC for ; Wed, 18 Oct 2023 20:33:09 +0000 (UTC) X-FDA: 81359731698.12.3DD6606 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by imf28.hostedemail.com (Postfix) with ESMTP id 95E29C0024 for ; Wed, 18 Oct 2023 20:33:07 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZnU4QZ5Z; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.215.172 as permitted sender) smtp.mailfrom=vishal.moola@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1697661187; a=rsa-sha256; cv=none; b=LBCMMY9kMjHuxi9vB6fMClheMrcyAFyCFiB1kA1UDIFsukbRV18cLQLUc1kwO8z8OlE4zK 57T8GDMSkaFK42REw/YXWaA9nAGIHqi4i3tc+lqKHOTJlY3Iw+ykKrljP+bsK1M4YzSfLT IPCPfCgbhl2KCXBHWo1wVz7hB4Wur/4= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ZnU4QZ5Z; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of vishal.moola@gmail.com designates 209.85.215.172 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=1697661187; 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=X8jWDR/ZgJmIkKKp66piz2uVDLnH/M22Jlwkva7IsYg=; b=Fwvpi2kex9VUqBqPptva7htjyH8zysnaQ6HV1qgjxquYAncIot2Lw2i9iZ2yUSVfT9O1AA xf2y6AWiiE5r7o/BL9HMfp/Sdx/hVLJ42bsyqxKV4pnOxxn56Zekp/S5c3WKGGLWiMllRB b1MwtQIqoDz6SavNkxkhu3MkJIYsLSY= Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-578b4981526so4490901a12.0 for ; Wed, 18 Oct 2023 13:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697661186; x=1698265986; 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=X8jWDR/ZgJmIkKKp66piz2uVDLnH/M22Jlwkva7IsYg=; b=ZnU4QZ5ZxNflpUWWYkQ4O5u374YXjsScEmOdxvNJ6jUvgEzcTuci1zoMIVfS3vqC/A DGJ1LSCKNRYN9dAXZLq23xO8KPgWO7A5MnZCQ2dDo9SG11E5sLGUm+TqH/yLTrx+1FJa xp7V58GV+GVU9bokUhey4kQl7k19wfumvF2cBXot10QkcWYWjxYLTucdnmFKrNVcmcbK hBm+orVXO5j+193xx7s32lPZs2SdII0XLWjFAk2ji1n8EvucP02Cz8aRIzfNEmqyA/l9 jqIhkyFxlh0ZWGpVuE7YG5FyNSfjkr2FZKMEfIA9u2XnSwhZ6BmVjLwCdbJsFd7vHYWG 4bVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697661186; x=1698265986; 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=X8jWDR/ZgJmIkKKp66piz2uVDLnH/M22Jlwkva7IsYg=; b=Q+NBkVZCQGfgk/EQ15O9FZJt1Hn5xDy4SFhCMgtWl60Tszrq0o1oET8qipNGnYPRYy MfyfokUDxZLNriVLOV105xIclQzwsFw3c8SkBNDGEm1OA4Cgvf5SKrcmhM3KtPH2RwoZ HlcXtbyiLSllxR2FNmaIBEtsS1W2IWHrT+urtg47NoAdiF9nWY/kl7uaBC26pk8Csd8+ ir/JzRMrj4zLxuZ878ZW1qs6GgndOVPJX0mHub++kYb9qbEy8Mxv6DAMGpvSkwzjcoMn VCU5Y9aMoXcEljNvBG/RoQyDPAsg/2HPqZCVgwLDLBBmituUzYr8bbNMWcj1drKfKzzd yGOw== X-Gm-Message-State: AOJu0Ywn3FUktU/FL86N2MzUEXolPM92I1EArsfIvg5ogrc01zqO/s+o zvayNcqslMYV2/J3X2FrU0klyyckrG4= X-Google-Smtp-Source: AGHT+IH0hnK1spD0NMASNofGlsws/sPM/TTyB7tCLaOY/hN83Q3KmURqvBqsuwZWLr8g9CSjzJw7Cw== X-Received: by 2002:a05:6a20:da83:b0:163:2dc7:d077 with SMTP id iy3-20020a056a20da8300b001632dc7d077mr293178pzb.55.1697661186019; Wed, 18 Oct 2023 13:33:06 -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 w12-20020a170902d3cc00b001c61e628e9dsm354412plb.77.2023.10.18.13.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 13:33:05 -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 v2 0/5] Some khugepaged folio conversions Date: Wed, 18 Oct 2023 13:32:08 -0700 Message-Id: <20231018203213.50224-1-vishal.moola@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 95E29C0024 X-Stat-Signature: gai5a5zz1t8gd8niahw8u35ep9idkzcu X-HE-Tag: 1697661187-760945 X-HE-Meta: U2FsdGVkX19unwFhXKdV2sI2FbWdZeZtNhdkIBZ7cffkF5+EdsU+72n0U6Rf8bRz+c/4M6MHIIYTyl0ha2s0C6O/tzdgO9isONv6pxiDfpumwPgSjMpH1jNKn67fGGiLKV1hgPdeDrzpp3efF28ppmcVM7KtAyf43OlgPEzeztGxxMeRkv1o23j3kHObqMuSOidgnCVJusVnoPEuSSIDETKgToNtiy1qAoMn7INQYFOHAoOA192qe90/alh54ITwrANvPR3Rdy6OzOW/qhWYJf+M3peZp58q2QtzZcOkoeiSAlCsqMKGpVMHUJMvdxNHAVzZccxpsjstDPKnS2DOv5x20NmNM4iSAeqjmXi+ikgKChUm361s/5jTYHy2IJnF02PGfxDHl3Nd5fqvM+yZlybBgYi7QtOAjWt4Tsz+sX0x7rEpwC8FEZk1dNPMF9mHnkDTh80pNqUT7y+Fuh7BwOcx14y8KkCMCuz+Z3F7iY32DiH6CId2bD1qZzSlHBlIhCI8czqTyu6Rc14khHF4BZkrsl978q3Isy6A8AdLA/KI19EWFWLnlWMypKuj7wRnmsiLMNJ8h6xeOYqe9O/x7cccl8/eMNIe4NtrgWuxwQq/uE8IsQ1dGpv5f4d9fDVoglmrZ97cOh98lvGKa+XC3OcbF2K4tB/RfBvws0EO92kjSlqkR7Ef3r8GXEKXNAQKNwbNKnv0G5Sm8/Mf2QGzlXRG/PA2Bua5U/GUqEG1NQjGnCcS80ZyKDp1xm+QlZDCUrRFuso2ry2uZXPlhLgulyAjavCDJnmL0zSloOCYrkXcTgbMKajGRG9s5uJHNYm7dHDYtXL9EVJD1xV8seMl6yNwSzQYQHo6f34Jc/2Miz2YYt/otu+PnA5qf2oIIQW7z5Yo+FsnE+bu0Sxbw+WOEVOuk54QdEj+4il+SGUwfXMZ41JWzuHqqO591eH8zqqogPy8e+fJYmI11sXVEqK 25nyEU8J VsHwuzRAqI+rOT/OXHqCWPuVOET5lz4RXvQ1sVAUYCO64AGuN840nHPjyf2AbReT//raHT+1CD2jwe+D85HfWW4wAG8YmE9CsNVjy+0Zzw7TexXyedYhy+GKi2vPnlu8I6sAiniInd1DQEdkItjEdEelpbfoxXLv+q8silxf9zl+kU0Ge68sGHJCHrBZyldxW3AsGMNo+3qbPItJBnW02vF1O+M9Qvxv2ghCGWQ0pelmBC6FB1s7zYYY4jVGhDriYaIjj4oU45foZ322vQDNyimB1GvUU+lEH9H7gD2jo7T0xW353lFN1Pj56CE62OMGdEXuCaL92EZfMvpVtU2NimRogHSB3ErWz9xtXbLCY6CyftaPDKJjUUrAhFRyTdlI1Pb5wiqvt4mVvn61rFFrspzYIvWSYDR4i/5ARafWfMLC6m9TRQMTHvPZN/RwmyK8Kkp7YBNYZEwYxNxzcNPiylES59hGm1dDgXKJk/ZUr1tg7xexD2L3rVi3b73Ux0DVnQxvSnAcgZcl4+iU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.037873, 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. --- v2: Remove last caller of count_memcg_page_event() Stop using the folio_estimated_sharers() heuristic for tail page sharer estimation 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 include/linux/memcontrol.h | 14 ---- mm/khugepaged.c | 135 ++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 83 deletions(-)