From patchwork Wed Apr 3 17:14:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13616514 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 5352DCD1296 for ; Wed, 3 Apr 2024 17:15:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 52A016B008A; Wed, 3 Apr 2024 13:15:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DAAC6B0092; Wed, 3 Apr 2024 13:15:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39E966B0093; Wed, 3 Apr 2024 13:15:14 -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 1D3DB6B008A for ; Wed, 3 Apr 2024 13:15:14 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id DC686140D11 for ; Wed, 3 Apr 2024 17:15:13 +0000 (UTC) X-FDA: 81968871306.26.D93774C Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf24.hostedemail.com (Postfix) with ESMTP id 84694180017 for ; Wed, 3 Apr 2024 17:15:12 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=XIiojhO5; dmarc=none; spf=none (imf24.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712164512; a=rsa-sha256; cv=none; b=k0ejH8bFY7iNPBNhMdomDvPedLxEl/fVdrzBh5OvEnYH4YQyKWxmAigNOBO3k3WpG92FmS rzVYO5QfkggM+Jsn7NseCMy0icuOrObK8JTYXLiMCeEz0OFyVpnqvoej8GFGBvoeyF19u5 /UQ+hIVu2fSkrcANsz7z4YBv9tdkJ1Y= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=XIiojhO5; dmarc=none; spf=none (imf24.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712164512; 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=IpFAkuK5GrANAaP4NmnY/N+aubhDpK+1vnYlU3fSkMo=; b=hBOl4Dbvb9nTPDNzgA6e2XcSMHcOZfeZwUN3H1iZw5vwHxyA2fx+//c2gRN4SWy0QbxoiK gb/ZFYiKtp1wp2KnG36G2cZ2oIVYRb6hMQuFxFnvYUvivrATbpyKliZSbgjLVO+q1IOZUa MWUYemaywA+i63p5xMvdhfCnV4ZJaMA= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=IpFAkuK5GrANAaP4NmnY/N+aubhDpK+1vnYlU3fSkMo=; b=XIiojhO5kzKUQnO5gfy73EzYel 0j7bndeBs0u1ixlvz+U8c/CjkZKaeZcdS1Yn4d3z3Yx/vNi8C9kGdCTSPx/7zVtph/0VubBldtien voFklC2HAuIv4NW4WJr2ePYZF1CMGxWWZEt3mFtY7FTYmVhzXNT5wFpd10P5lxXXXBxTS2n9PPmHw 820AXRPRR0Z9P3JIq6bqPesLm5g3t9g34W2I5FNcfMm+B4pgPTDu0aVL7Eba5ws7ZGdW4rBjWAGpF DxibgX4J9Z8low00bBHS+ItrUewlgDzRJcxz7GMZas7v5/vpM5XxiualDuXnfDcqosJ7dNoXpYWP6 ZlyproiA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs4CQ-000000063wV-0ND5; Wed, 03 Apr 2024 17:14:58 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton , Christian Brauner Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/4] Use folio APIs in procfs Date: Wed, 3 Apr 2024 18:14:51 +0100 Message-ID: <20240403171456.1445117-1-willy@infradead.org> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 84694180017 X-Stat-Signature: pygdugnbyp4op7y6tf1abipuj57kferq X-HE-Tag: 1712164512-112825 X-HE-Meta: U2FsdGVkX18CDBSQII01dhzl39Y969rX5ABQUaA6GqQsoqoyrdPpurV99I6+yK4vzP15CpoQmliAsQowTnhT7RQrl+CsfapZ7MhKCxR/5v5RlZr5hzo6YgI5tnZ4yGTjERD3b8Kd5dlDfolco+Vr9Ap3RYmn6v1z41lW9Ua26A0iKbruTl+BcencTri6xzlyTnNfDGIRsbExy2vFhb5dCwHE70HTbQtjFFPLFlClWyPe8biHmNXzjdxEVcw7KdxYOEIpv+5Stp8TOJJVmuCoTF98HYUzer/nX1B+yu+JOs1mv9Ef8FRtZR8O+dkKjr3dPqeMdZIb4Vl59vdeBBhn3H+BaSp76zH/UjoJT1X9nbBB0kPTdAcGTgJmQ7RWkvDj+8WQ/lkwcCyBqfTZxq9I6969kWZZIcrpOoqBvG4j5cT3jTWdZ7hATS/XIuMc0KLEREMyreSGcY5bJ9Hh+/txRkqwjMPl8/YlFtLWzwfNQDUH756lW/5Yf18v6rCdtXzjV065oy3AOzZKP/E0SowP7e+ayMXt0R/LK52baQXMNeETc3M+JOkZ86/NGjPe4aoPIp0mP7mA/Z/Dij6usIWbkzv2l74LI0A9nbYZBqKCyrXs83311aJAOZI2GZjQlyTJtHpFW90deUS2hV4yVn6a1Ndb43wYdyX88Nq6xt2tXmTUxXoLBltSqtcgptlG8RxNg29/vyYklWigWa+1a0vY+ZFefqwKzSavqp8BXzfQVcQioBSisZVyAf7y4MrfC7AAWhy/tJpod4EqQVu5fZ09pp+zgkqNnaRXMRJmIVsFWNDxQx6bXGo5Jjwk+o0yPth3K2GNNiPm8chfjrsRHus60SRCB4etrOK+h/Az3HDfBt7gEw74IHvE+w== 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: List-Subscribe: List-Unsubscribe: Not sure whether Andrew or Christian will want to take this set of fixes. We're down to very few users of the PageFoo macros, with proc being a major user. After this patchset and another patchset I have for khugepaged, we can get rid of PageActive, PageReadahead and PageSwapBacked. This patchset has the usual advantages in its own right of removing hidden calls to compound_head(). We have the page table lock, so the mapcount & refcount are stable and there can't be any races with folios suddenly becoming tail pages. Matthew Wilcox (Oracle) (4): proc: Convert gather_stats to use a folio proc: Convert smaps_page_accumulate to use a folio proc: Pass a folio to smaps_page_accumulate() proc: Convert smaps_pmd_entry to use a folio fs/proc/task_mmu.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-)