From mboxrd@z Thu Jan 1 00:00:00 1970 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 A6B50C433EF for ; Thu, 16 Jun 2022 23:08:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 15ABA6B0071; Thu, 16 Jun 2022 19:08:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E3586B0072; Thu, 16 Jun 2022 19:08:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC5E16B0073; Thu, 16 Jun 2022 19:08:48 -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 D83086B0071 for ; Thu, 16 Jun 2022 19:08:48 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 9A52B803A3 for ; Thu, 16 Jun 2022 23:08:48 +0000 (UTC) X-FDA: 79585640736.02.EE9911A Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf01.hostedemail.com (Postfix) with ESMTP id 07FB2400B0 for ; Thu, 16 Jun 2022 23:08:47 +0000 (UTC) Received: by mail-pl1-f181.google.com with SMTP id f8so2430602plo.9 for ; Thu, 16 Jun 2022 16:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PlzEVLgbgcNLoTiedFQlmIfcdcTRlowz3FKTRI9/iaI=; b=Yensil1fzqL+EyeQnMb+J4phzUgdOKoa9OBX3qhyruae87Oqvy31GYKJa67G2if2Z+ oU7Zmkk8KzIkgffk1I4FE8mRnznmr/o2+qSvyPf4BXotVkTB4hF4bAna/jLVE7oJ0GhB lDzqaUAO5grP69Yqpox0+IuoUij8Ru6dIttEthhIsk3sEO3kQZQw6vEwlWdiEriuUVLn qcDLoiuzuFTmRGjTYlgGHk6NF71VdFJLiUeu8xyHEpUSx2ej75t6CUoNGKzQHespZYcq bBMAAVykBkJO/D3IYstzDwRHpK2bH7D9y6ihtehIvIjzF6mgkYcwRklLfXV3gTaF1tVa x3IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PlzEVLgbgcNLoTiedFQlmIfcdcTRlowz3FKTRI9/iaI=; b=lwOabTTzhxrDbj64hBM+NR5AJzeui6BOjSmCohuao68RXY58IlPUrdLjT3r7wobY0E lexhVbFxYfyjj2UpPxP3RyN0zCxPQ56QGAcP6Z363Kj/c75tid3v2TXX6FIQEe0tJBjE rw0SY/97Z5KSXxMRhtQaYrEAa8eUSitUfgLYnnHwPRk0a/S5l4+oAdXpBP3AHb5+Oqdr RAkUobUvKEzl7Be2HKmsxsH+f6SccBc5nZZxqQrpaXVqTVohKTot1a0kYImyQPqqLDUy Qgt0NlN10RkCxCDcd4lO9ZiAq4C+1l4Cx8moIHxQeFHA0kK6GHrLuP++c34OkBrUm1ye SjCQ== X-Gm-Message-State: AJIora+CPmj0HnDb3i02zFcnR/YxXqI58d2wh/+9UCptlf2Fl9QasjY6 adWpHsFNlu1OBa/7iSLvdj5KqA== X-Google-Smtp-Source: AGRyM1vpupA4NZl6KGgvrWJFG7O3PRT2VHndwct1OqxiBBgAU4F0aTk0eCZ8/MSi1FsE5VJQToEFCg== X-Received: by 2002:a17:902:d102:b0:167:4f35:9580 with SMTP id w2-20020a170902d10200b001674f359580mr6849416plw.38.1655420923542; Thu, 16 Jun 2022 16:08:43 -0700 (PDT) Received: from google.com (55.212.185.35.bc.googleusercontent.com. [35.185.212.55]) by smtp.gmail.com with ESMTPSA id ay10-20020a1709028b8a00b0016191b843e2sm2126575plb.235.2022.06.16.16.08.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jun 2022 16:08:42 -0700 (PDT) Date: Thu, 16 Jun 2022 16:08:39 -0700 From: Zach O'Keefe To: Yang Shi Cc: vbabka@suse.cz, kirill.shutemov@linux.intel.com, willy@infradead.org, linmiaohe@huawei.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [mm-unstable v5 PATCH 0/7] Cleanup transhuge_xxx helpers Message-ID: References: <20220616174840.1202070-1-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220616174840.1202070-1-shy828301@gmail.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655420928; a=rsa-sha256; cv=none; b=IaYCvQDRJe4wgo2xVXIDVxdr6sIW4UBHWLBvI3Ni7UEDcfkljMEA0QpLnv9RU+UzZF/h9X 9THJiwS8zwECJ5Exhnpg8bZKuYbysIGqEWLz3efkimcbT76wnoEMefQa0jncW3OGWQwR4P h7dfUoMiIs/PETt9RG29Bn2jk/AhGtc= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Yensil1f; spf=pass (imf01.hostedemail.com: domain of zokeefe@google.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655420928; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PlzEVLgbgcNLoTiedFQlmIfcdcTRlowz3FKTRI9/iaI=; b=vkzYEIZCHaW4iUSmKYP+X65JpkOJrfSUX+abYQuN2wyCL2M3naGwmfTy7eBVqSk6JgDDS7 KVpgHXARx3Mbz0d1rLSjfzc9fVoIt1ms356O3o8MLC3ddaXfrqQ04u0CeAGotV7aJsu9FX 2h4JEvN0LrQK0AYT7G9w+wd0h8IMaaM= X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 07FB2400B0 X-Stat-Signature: 3ue4nijj8neidmb6aom76mdjcgj843jt Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=Yensil1f; spf=pass (imf01.hostedemail.com: domain of zokeefe@google.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-HE-Tag: 1655420927-628326 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: On 16 Jun 10:48, Yang Shi wrote: > > v5: * Removed transparent_hugepage_active() for !THP, per Zach. > Patch 4/7 and 5/7 were updated accordingly. > * Collected review tags. > v4: * Consolidated the transhuge_vma_size_ok() helper proposed in the > earlier versions into transhuge_vma_suitable(), per Zach. > * Fixed the regression introduced by patch 3/7, per Zach and Miaohe. > * Reworded the comment for transhuge_vma_suitable(), per Zach. > * Removed khugepaged_enter() per Miaohe. > * More comments for hugepage_vma_check(), per Zach. > * Squashed patch 4/7 (mm: khugepaged: use transhuge_vma_suitable replace open-code) > in the earlier version into patch 2/7 of this version. > * Minor correction to the doc about THPeligible (patch 7/7), so the > total number of patches is kept 7. > v3: * Fixed the comment from Willy > v2: * Rebased to the latest mm-unstable > * Fixed potential regression for smaps's THPeligible > > This series is the follow-up of the discussion about cleaning up transhuge_xxx > helpers at https://lore.kernel.org/linux-mm/627a71f8-e879-69a5-ceb3-fc8d29d2f7f1@suse.cz/. > > THP has a bunch of helpers that do VMA sanity check for different paths, they > do the similar checks for the most callsites and have a lot duplicate codes. > And it is confusing what helpers should be used at what conditions. > > This series reorganized and cleaned up the code so that we could consolidate > all the checks into hugepage_vma_check(). > > The transhuge_vma_enabled(), transparent_hugepage_active() and > __transparent_hugepage_enabled() are killed by this series. > > > Yang Shi (7): > mm: khugepaged: check THP flag in hugepage_vma_check() > mm: thp: consolidate vma size check to transhuge_vma_suitable > mm: khugepaged: better comments for anon vma check in hugepage_vma_revalidate > mm: thp: kill transparent_hugepage_active() > mm: thp: kill __transhuge_page_enabled() > mm: khugepaged: reorg some khugepaged helpers > doc: proc: fix the description to THPeligible > > Documentation/filesystems/proc.rst | 4 ++- > fs/proc/task_mmu.c | 2 +- > include/linux/huge_mm.h | 80 +++++++++++++++++++---------------------------------------- > include/linux/khugepaged.h | 30 ---------------------- > mm/huge_memory.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- > mm/khugepaged.c | 84 +++++++++++++++++++------------------------------------------- > mm/memory.c | 7 ++++-- > 7 files changed, 130 insertions(+), 158 deletions(-) > Series LGTM. Thanks for these cleanups, Yang! Best, Zach