From patchwork Fri Jan 10 18:21:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13935192 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 446AEE7719C for ; Fri, 10 Jan 2025 18:22:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B8E146B0085; Fri, 10 Jan 2025 13:21:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B3C366B0089; Fri, 10 Jan 2025 13:21:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DDF66B0092; Fri, 10 Jan 2025 13:21:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 7C6996B0085 for ; Fri, 10 Jan 2025 13:21:59 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id EF35E44D48 for ; Fri, 10 Jan 2025 18:21:58 +0000 (UTC) X-FDA: 82992361116.19.7F1C8CB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf06.hostedemail.com (Postfix) with ESMTP id A921B18000C for ; Fri, 10 Jan 2025 18:21:56 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CkN2G16e; spf=pass (imf06.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736533316; 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:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=YCQS2iPIEG2Pr6Y8GEV6ga5nC0EeZjPNV9f8DLXbDKo=; b=Gl41HMP0YhpxfIqfO/jQ8OIty7bkCi6WOwhyFuqGL13Y+LsuQawfejYU3qItdb5B6YJCj6 c+mMT5wOgj/7B6t6GBWohpQDtDWi6DMsFwCOHe886vmNAwkW/YvcF9gIpQjM1/5BLTC/3I VhfTCHhQJRik2aWxJqU05F27nTKQDfQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736533316; a=rsa-sha256; cv=none; b=Ep51dbBG5mugR46Gth00F6Xc0QdFL+YmC4pyJi2QH+kjmvcZU2SrB2GPLmbkSeZCGPB6o4 6IBJpB5qMMTD9OHT2+F4vYuBF4vitnMxunL0mktLFoQoRWr9qyUKqGTYoPEy37eCa2hHql Fh2PItSC5Xle/6KRjPis8pAHFTbYIqg= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CkN2G16e; spf=pass (imf06.hostedemail.com: domain of dhildenb@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhildenb@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736533315; h=from:from: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:content-transfer-encoding; bh=YCQS2iPIEG2Pr6Y8GEV6ga5nC0EeZjPNV9f8DLXbDKo=; b=CkN2G16eBkIalHXpbbSb9g/skb3vLTl3tv5vTUM60qh9CZLH62NMSCBET4ZsgfZwwKqPrh fjtuVUGQzc2Ril3pt1ftlX+sPALwlxGI2ee5IuVyK7UB3YJEp3512fbtPrZoAHZTBH38/6 oAbNvRLAj0iyc5qzBCSRGQoKXBKIlCU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-286-ugWmkWX9Oo62GKcCZCy2RQ-1; Fri, 10 Jan 2025 13:21:54 -0500 X-MC-Unique: ugWmkWX9Oo62GKcCZCy2RQ-1 X-Mimecast-MFC-AGG-ID: ugWmkWX9Oo62GKcCZCy2RQ Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4361fc2b2d6so12986535e9.3 for ; Fri, 10 Jan 2025 10:21:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736533313; x=1737138113; 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=YCQS2iPIEG2Pr6Y8GEV6ga5nC0EeZjPNV9f8DLXbDKo=; b=hO12X6yf7gfTqGvcFMYTKyXrXB/0nBqYuNU3BgJGll13FGb3wUGG+skAuB2pIREitA 7TSXAOd9b6f+qcrP32lcJJz9xfura6paLU0/xS+8lpjho1CEm0KWAvEf4rOD754Blvt+ PAs+czGHC9rqXOb9hYqN8xsXdECw+lxDsnWAY+wIad2OwQad81yOGCiOW+8QlRz6J7Ck rHIK4fCF0zQXUHYDOR4mew+bC9rtC3czpYn9X9OcJgOMgKPGFGO32ZJiocN3erTRnJV9 5O9Wmajh2z83B3COLFai7nDSW2uRhwmVqCiQaJA8j2SPk9hhBnV7dw4mQ8EXoqwRVSuz IbZw== X-Gm-Message-State: AOJu0YwdIr3TN1BVXi1bnjfy0Q2mP3QX5x0kxi8l8DIJo5C9cxJDLu8G uNZzwD7JeYkLPHhHifoeuiXVPkqoajjPFmTqX2ras64JddHYw2K5vQtroHS7WTdgpZ2VuuIYbUQ 7yVj4SAnX6P+qvMIhDcTA5gvl7vhXBWEgpw5LTk6HbRw6TSA48WGUfzi/2C0= X-Gm-Gg: ASbGncsUQG/TWLtx6WBnh/dhKqp7AdvujdOG2nVY1qB14JVdph2Gqqg6EkIHFx/b8kn M/WX5gPx9mZbAx6JwHqVSesKeQrNkrhLUMxqP5ZDQj+iXuSDr9n0csFtoo1gL8Vqq4u1gscLvMa jvl4PGHD7vjcQWrg/5z53vrXvTsTThXpJaxWUUYAGP//lng9uyma6RVo1OHCRGSDPUsUevgxCWp zD0L68dE6LygPyibJ3646KjY5lsyBPnHxhQ8cMoWFqsxgHewQXldXwD/F1OPLPfdO9H022WNjWx g41XjBa6MT8NrNt/zBTBmwKdJRrSmMzxEtTcnHrsbg== X-Received: by 2002:a05:600c:314f:b0:435:9ed3:5688 with SMTP id 5b1f17b1804b1-436e26a1f79mr113825805e9.18.1736533313425; Fri, 10 Jan 2025 10:21:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFB9sg+Dm6hpOQ8E3h9VGeCqOoCXsE5eRxnGRSqo2X8a6kNJzS00th89G0r4EQGIAwJJ9Akeg== X-Received: by 2002:a05:600c:314f:b0:435:9ed3:5688 with SMTP id 5b1f17b1804b1-436e26a1f79mr113825585e9.18.1736533313050; Fri, 10 Jan 2025 10:21:53 -0800 (PST) Received: from localhost (p200300cbc708e1004f41ff29a59f8c7a.dip0.t-ipconnect.de. [2003:cb:c708:e100:4f41:ff29:a59f:8c7a]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-436e2ddd113sm96429215e9.25.2025.01.10.10.21.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jan 2025 10:21:51 -0800 (PST) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Muchun Song , "Matthew Wilcox (Oracle)" Subject: [PATCH v1 0/6] mm/hugetlb: folio and migration cleanups Date: Fri, 10 Jan 2025 19:21:43 +0100 Message-ID: <20250110182149.746551-1-david@redhat.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: H4LwqthNYK_BiPOpQtV_YdAQpkNsftHS7VREqBvdWBg_1736533313 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A921B18000C X-Stat-Signature: tug1kpqsq34k3qnmw545e8mmb3xtdsx5 X-Rspam-User: X-HE-Tag: 1736533316-93927 X-HE-Meta: U2FsdGVkX18WRQNti/NicFAuqCDKK0UYDo+z4WWe9wixaKBxkAUmFk2x4vJovUeksZwEt1UGNt2GeEX8IC5mxDwQOrEm3LoFaooluGtZMtdzjpHNSxe2557Thlfi5vlu6B1W1j88Xw++8RKNHM/7V81ihs1kURBiniwJrwtNYwyLthX3FYdG5/fYxO2H+ZjiqdXVSqLAk/mmo7sAQWZodqcsrF5bN2EPa6/9hE/9thahRx5i/u3rZBnWcJVWkitwZ4/mEhVNK7/C/HrC2CTCXevO6F+DoLx+/QxuoBqi/vb5bHiJuVInOeul8VdnCUb4aDV9vrVPC2sVtTV+4dB7M6RhOOCc/ApMN9/+lpnwZgnUWS881Z6uE0EOmEtPR6vJuroYtF6H+tRXIF8gi7CFrUDPN1/D6/0f+tKMaikSiVtjN0fNEKygWGkDp2Nq/y7+VC4OR2ZECUUDQxP++CBdMGGD8e+SpzB8ek8xkAMP/Vng4J8UkAUyiAoxcDYHT6NC4FSOMt6FaRdYPa9fd/yAdoSCRIZ3LJmWEYT/Bp7bRXgeliihHUS2sE9hPovZVpAtBty2zKws+PMBUia+D8EEma3YQnCSwZ4C3amyLzTBWIaSqmTjwrVx422q/6hSTGVlri15L2oawbpouMuDBHFYYILQLs/XgPdir6UWl88zdldTQAp/v7yPcQTsNFEGqWKcWhscalDWYTCIH8Gz48s9qAo707D7PdeMB3IzcJvF0QZNk59LNVhCmyPhBOa20IXQPYKywOIRt4GJvgBMhZgE8sVRzfegRl8MSSgztjMaZ0pRlXJBqHgrwasG4a/iaXnkCQQHlnfk7nenP9WFP8361pXux2dxLuWSJi74I4ynAo+HCsnvPlLAmuhKwWon/WLlIryYMxRfOx+Q7EbzGkwZ6s22MsIFtcZMvaROcksUsl2CY0Jpmy+Ww4bWk0i2n6h2cb/sF27aky/LPQsCX0F PEc+Vh76 6fxj+U84ZjzclgKuREOrtfQ2TTIHmgVuN55CABRAPp9+Wzgxl1E5dfv7k8OtxLbNPuVSzmdiaMjGYFH9DA8Yh3EPRNo9anrqR4GO/FIkKroPtrZjL93fZkkPLZFDQIpRCDK+mdyhtqd29Ybe59cgcsTpFVeBB0AaI8LiuhHve13i84bkrDo4GXfsfX9EPcaPeWP2XEDU1pjL8xTintuChTjvvH8geh4f9fC1ijvoN+F95JYYkYlI8SWVL4OyspZRC/n575ziFkwTIEmk1FSRXOfxkEzAxejfL7H1OQ2oYXhWkJ1iLYAIN1/i2b9oYsP1DxB40FhGExUJJf5yOcQMu2jVFYWbJwPIxN9UVC0AE2E/KNGaqCSgK66qT3eS34C6z80dkiD5q7ypiGVxWQ4jVA2VD9Inq/S7f9scUgQSWJUuR1bSbP8lQMPUMsaV9suXUay90xcOhdbqaeaM8gTqkhcsVuJ9RdQ1JOxi1uth5Fk14JT7ym/NtxK7DtBXv5MQPeIH5hku5MnzanzExTh2zyYfb2RCw46J6+qZg5Fd/eG9qmuq7OR48v1f93F+wmJnIn57j 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: Some cleanups around more folio conversion and migration handling that I collected working on random stuff. Patch #2->#6 were previous sent as part of [1], but I think they make sense independent of that. [1] https://lkml.kernel.org/r/20241108162040.159038-1-tabba@google.com Cc: Andrew Morton Cc: Muchun Song Cc: "Matthew Wilcox (Oracle)" David Hildenbrand (6): mm/huge_memory: convert has_hwpoisoned into a pure folio flag mm/hugetlb: rename isolate_hugetlb() to folio_isolate_hugetlb() mm/migrate: don't call folio_putback_active_hugetlb() on dst hugetlb folio mm/hugetlb: rename folio_putback_active_hugetlb() to folio_putback_hugetlb() mm/hugetlb-cgroup: convert hugetlb_cgroup_css_offline() to work on folios mm/hugetlb: use folio->lru int demote_free_hugetlb_folios() include/linux/hugetlb.h | 8 +++---- include/linux/page-flags.h | 6 ++--- mm/gup.c | 2 +- mm/huge_memory.c | 2 +- mm/hugetlb.c | 47 +++++++++++++++++++++++++++++++++----- mm/hugetlb_cgroup.c | 17 +++++++------- mm/mempolicy.c | 2 +- mm/migrate.c | 20 ++++++++-------- 8 files changed, 68 insertions(+), 36 deletions(-) base-commit: 0703fa3785f1b969a3a98fc9bb3e4ae5062684ea