From patchwork Fri Nov 18 09:08:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 13047880 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 8D75EC4332F for ; Fri, 18 Nov 2022 09:08:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 140E88E0001; Fri, 18 Nov 2022 04:08:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F14C6B0075; Fri, 18 Nov 2022 04:08:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED38C8E0001; Fri, 18 Nov 2022 04:08:29 -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 D98596B0072 for ; Fri, 18 Nov 2022 04:08:29 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B14E9AB194 for ; Fri, 18 Nov 2022 09:08:29 +0000 (UTC) X-FDA: 80145987138.19.8E16B8A Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) by imf15.hostedemail.com (Postfix) with ESMTP id 6436EA0008 for ; Fri, 18 Nov 2022 09:08:29 +0000 (UTC) Received: by mail-qv1-f46.google.com with SMTP id df6so736450qvb.0 for ; Fri, 18 Nov 2022 01:08:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=4jgJCL3sHoSHtEVZaxlQfRVEHYZ212AYWgGq2TLVydQ=; b=a2wpWHTporknCd1s9pPc2LAMPddZOemCMFlzk3MqZj9hClmoNsmS0E8aopvfJ0Pk5O lfFrfDf1DQNA98cj2IqdkeThsGiioaNhdEU8x9FlasQAeG9gv77XVBLgXLtm22tb6ds8 DElvqyoQ5RP2FEbXrxwuJJf5NAcRyBkmwlXZ/Wz3FSGRHEyGEfhZN2hofXa99LgGJOo8 4kCB1BEjbjw2S5SOXetEdh2El/+g2g+xZEF1ZOVe2+LobsueOYobBJxZZboKv7bYMSWt Mr7iNpsDvn+j7ut/QE9PIa52pe8cXOGgIivGMEoYPa7h7RNB0ogvBM8QS2+Gg27TTadd 69Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4jgJCL3sHoSHtEVZaxlQfRVEHYZ212AYWgGq2TLVydQ=; b=AQq16DB9VQBHvRhqigg9jjqyhm9cjSSifwjWeqZZhNnLDuWGvWd9dhIVtjSJ3m1YJL 4NWFyDt/FL3uMPzKWV3YOYEm8/y9z/Y/zS7DLi6HESvCdYQ1koqyhzASHFN2P+ve8pn/ PM4p4Dq6+TRW//wS+YVREvq5LjyGgjywwqImI5c3qiRj4HawtfS2CLtJydsJ6ozRGfg/ 1NeGC4Ioc9tM6S/sot7dINWEskHkSbpe5+ZALo9pg/AhK/KOS2dgmzQi9X1o8aTOi6t9 NzQOJR5hpuxrLoW5ysjUxxroZU0oN3vukKm5skn5uo7yHedtObD///2YKNZPYVgKwGnq gqyw== X-Gm-Message-State: ANoB5pm+kDxdRHIrxpat+VxS1Ja/5cm8jPvjz1sLXikWGVSGgmqSRh62 Oiwut9sTqXwMOXQwjdS86vKwZg== X-Google-Smtp-Source: AA0mqf4Vu51irMi7KMNB0pp/d3qI6KcnZMKnFehDL6rPbRalZElCeD38eKKA345/qu0r12lKOEloXA== X-Received: by 2002:a0c:bf0b:0:b0:4b1:a359:c204 with SMTP id m11-20020a0cbf0b000000b004b1a359c204mr5893127qvi.64.1668762508583; Fri, 18 Nov 2022 01:08:28 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id x22-20020a05622a001600b003a57f822157sm1765388qtw.90.2022.11.18.01.08.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 01:08:28 -0800 (PST) Date: Fri, 18 Nov 2022 01:08:13 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Linus Torvalds , Johannes Weiner , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Vlastimil Babka , Peter Xu , Yang Shi , John Hubbard , Mike Kravetz , Sidhartha Kumar , Muchun Song , Miaohe Lin , Naoya Horiguchi , Mina Almasry , James Houghton , Zach O'Keefe , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/3] mm,thp,rmap: rework the use of subpages_mapcount In-Reply-To: <5f52de70-975-e94f-f141-543765736181@google.com> Message-ID: References: <5f52de70-975-e94f-f141-543765736181@google.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668762509; a=rsa-sha256; cv=none; b=EIN5ClAeNFArqvIhedTD6e6jjy6vaaQVvupLhpz56FCKAJc5JqzIK+YWgcRu6E4z3OjOyk TF39UfBu1xtkyDO1Fsf2AkhVQtnsQeuTlv4xZVKdSS+7C7+QPAlmVSY1SrY6bZLvRr9YJi CJ0CuheZk50Rav1ER8eTahpkwFtKAkQ= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=a2wpWHTp; spf=pass (imf15.hostedemail.com: domain of hughd@google.com designates 209.85.219.46 as permitted sender) smtp.mailfrom=hughd@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=1668762509; 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=4jgJCL3sHoSHtEVZaxlQfRVEHYZ212AYWgGq2TLVydQ=; b=3hUhowP0kjRgbvR7Vm3MmP1VPE7zswKQq8YxBbkoe5IHYA+8Xqmz8Ca7d/xPTGUrsDN6Bp 8CnftHgGi8U6xGUS9p4BgDjHp9hcZoQ97cZEhVAcd+9PZkPaX7Z5AVCcyv4hle343oXgP5 svKEl9yzf23Vrrd6eFe0s6DvrSDuDZo= Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=a2wpWHTp; spf=pass (imf15.hostedemail.com: domain of hughd@google.com designates 209.85.219.46 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 6436EA0008 X-Rspam-User: X-Stat-Signature: wbyarskrfere7e6w4n51xgy3oe1465wu X-HE-Tag: 1668762509-377521 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: Linus was underwhelmed by the earlier compound mapcounts series: this series builds on top of it (as in next-20221117) to follow up on his suggestions - except rmap.c still using lock_page_memcg(), since I hesitate to steal the pleasure of deletion from Johannes. 1/3 mm,thp,rmap: subpages_mapcount of PTE-mapped subpages 2/3 mm,thp,rmap: subpages_mapcount COMPOUND_MAPPED if PMD-mapped 3/3 mm,thp,rmap: clean up the end of __split_huge_pmd_locked() Documentation/mm/transhuge.rst | 10 +- include/linux/mm.h | 65 +++++++---- include/linux/rmap.h | 12 +- mm/debug.c | 2 +- mm/huge_memory.c | 15 +-- mm/rmap.c | 213 ++++++++++------------------------- 6 files changed, 119 insertions(+), 198 deletions(-) Hugh