From patchwork Wed Apr 3 17:18:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 13616531 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 CECFDCD1288 for ; Wed, 3 Apr 2024 17:18:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 551026B0093; Wed, 3 Apr 2024 13:18:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 500E86B0095; Wed, 3 Apr 2024 13:18:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EFD36B0098; Wed, 3 Apr 2024 13:18:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 24E276B0093 for ; Wed, 3 Apr 2024 13:18:42 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DEA57120CD7 for ; Wed, 3 Apr 2024 17:18:41 +0000 (UTC) X-FDA: 81968880042.27.299016B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf02.hostedemail.com (Postfix) with ESMTP id 5C1788000E for ; Wed, 3 Apr 2024 17:18:40 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=XS8QNAc8; dmarc=none; spf=none (imf02.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=1712164720; 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=8W04Im1VZAHW+XyTx7WIV1SpzFAXpnx6i5P6nSi4wgA=; b=LaEliR4PZLOh9ryUUD9OTMnhOzrUmBv2UtOBlS546KZY6eCYUAO0LXM3hDWX25H3nYjlBG T3L+b9pPYWKYrWloa7qf7dj4NRjBhhwinc+3IXzUjufT25gBk2HuTkkOCOPTkKdhD5tpi9 wU/iP8Z/CM/ttnrSqAKr9MnXlTsN88A= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=XS8QNAc8; dmarc=none; spf=none (imf02.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=1712164720; a=rsa-sha256; cv=none; b=fPOYl7sWhgMo6vhDW0G2KYfc9O3PqIinO/kG4EUW7JMRvqhjODgKfpSc0kQQ3QMPbS6uh7 LUM38pQiaAGQT/QQkiVCpXfjauz6LuVOeHPdshhyyFuRuoeXR3aDZgyAOZIhHdNL/oN/Og nkFaeyf42QFzDOvLDsbhfpGXI+eMTNU= 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=8W04Im1VZAHW+XyTx7WIV1SpzFAXpnx6i5P6nSi4wgA=; b=XS8QNAc88bUABpuxFyB6BI8Tm8 WX4fejGUwS2mI0d8kuUC912e/mZGEjxj2zWXq00q01aT0TekM0kcd4jtYfcNS+bbXKe/t/usPFK3a oMNGc4IGlv4WhCmsdIXhcrfiR8SyvDYeby3W5USRiPXExpyO3/rfLpiaBwxMLfA5tLD76DAs025KR JhXnihn1pPNr9Xt9Tdn/ahrwa7dRv8mA9sitT13RGuBmp5m1jXryMcPFxLbqQO9+U7U7D91bgY792 wD/BaaKdLfdDHs/sikR/7GcmVo9XAg9lUr0iQwZsZXd1Me1h7aWH1DvtDQIsxgyzxmhDt0bmkficL uCmv2ndg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rs4Fz-0000000648Y-0axl; Wed, 03 Apr 2024 17:18:39 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 0/7] khugepaged folio conversions Date: Wed, 3 Apr 2024 18:18:29 +0100 Message-ID: <20240403171838.1445826-1-willy@infradead.org> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 5C1788000E X-Stat-Signature: o4bd86xrobo1pd5f3c5qdsim8atsczsf X-Rspam-User: X-HE-Tag: 1712164720-757458 X-HE-Meta: U2FsdGVkX1/NhGGDseyiq2sjSD2KPQ/HxAz/v1y1G0ODyeFieHKh/UiTg5ggnHE0VilFCKAPmlnWQ3fuBcj0sjsSCmwmUs58f8LgQpxRV7DeAifksRjXdnpiHM98q13M0GTOyq2Ro9XoYlx8DohXJKKSuc/ELwSwc8IR60Qor3HDmJTNKVsKOu8lZJomKlXTT3IS4L2ju/RL/jbT6DpYf/PdpFpB2UUB3+IDO/bI+87prd6rGc0Z415J+mGKTg+cVB2CXk3hfrajmiIydiSc+JhFNhTR/BN5OM+NzWPN8kHv4w67OGxQwPbY/NtNp6ja50xLUB6YgKpizCdq/Or/AAsrInm/FQ6sKnnxwYSlTXwa+nFz0BC2uJeZsuIbbvWbau6tsH45k1R5YcoFgE8I+Hwemi1o/P6RQxrzh//ItU44g05Jj+ET8zJeExV3i7c9jDGfBG4y0HPzjynBE+8Y5cmbykQyyL+tFO+zwLe8+ulVqmFjCXZX3ATNVUsZW4LMrin+wdvq6ME51duaMajOE1a/vth75wGNoJDpaWdTwe/aE3bLwkwMExRmZQsq4Ci3UUUxa+liaQrwOQn8hh3FxPCGtWIRBqR2Xrp5syQ2PkoRTIAzwWnTAKqWho1/7eqvGeUCnQU+N/xgJ8Ep93NJe8V/BPclvR0IoZG3aqiRAzdm4Yveg6OVyTI7Af2IkjizH300PheH2JgI11pc8NUvMMf4w1fbav/sX3P3aPJ1MI85fqv6IPUKQeJUmIUO4IxUU035+eYR9cp9GfnKaFHO205P5tVulUYpbzq3iowK5teXfaiflXOqJs/KiysxnV4jfaynqY8nyu1Sdge3Qakj9rJ3ZYcthilH/TUsz9qLrwH1nmSDDMJyD01NjUuQU5GDdHtgUwJ4gSHyGAg9L9bdOu4pXUsfjveMfUWWL9Om9t0GpllXHP9lO6pkpOVAfG4Y7Q8J7VWvg/ZKw96QSf3 9wIu5Vss D4sc3WPge0yp4i08HbXM+6VklDqmBfDrKqQhcJXQUm7QkKKYiLeWyshAVEUppcE+v16OoIBsmpSJOuPVrBHXNo7/8ivLRledk2AODnOFcK4nr7RDOpzIlXWL1iw== 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: We've been kind of hacking piecemeal at converting khugepaged to use folios instead of compound pages, and so this patchset is a little larger than it should be as I undo some of our wrong moves in the past. In particular, collapse_file() now consistently uses 'new_folio' for the freshly allocated folio and 'folio' for the one that's currently in use. Matthew Wilcox (Oracle) (7): khugepaged: Inline hpage_collapse_alloc_folio() khugepaged: Convert alloc_charge_hpage to alloc_charge_folio khugepaged: Remove hpage from collapse_huge_page() khugepaged: Pass a folio to __collapse_huge_page_copy() khugepaged: Remove hpage from collapse_file() khugepaged: Use a folio throughout collapse_file() khugepaged: Use a folio throughout hpage_collapse_scan_file() include/trace/events/huge_memory.h | 12 +- mm/khugepaged.c | 293 +++++++++++++---------------- 2 files changed, 142 insertions(+), 163 deletions(-)