From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1432312E5B for ; Mon, 13 Jan 2025 13:16:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736774190; cv=none; b=htVL782kH5g+Sb/Y9rXfEM4cSdUS4kbJcVr+c5JOu2HhVED3Jp/XWfSqUfHjZr+mJdX+0h8VFKSTRqtSUw56wud4w90C1pm6kqzyrSL0xCwkBpxNChL5zLxA6dDryR4RutInQJcYM/A7/xpRg6y8ihjGz9PYcbn88159aeKgjDM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736774190; c=relaxed/simple; bh=zoJ9gfNyFrTUov/53adwDRDalFdFyMEozRIvKzwT7zc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bBSF46+RkASKPu46KZ3w12p7Pen0saOB4l8inFsVDFAn4x+ZcbR1e5+TXJDX5Dm55VxyAObj3DmSA1TAlcoGXhPHoe013EN6HXEa+3tDzxEHoxk7WRP9rhoHDtbEAQXtSNXJccdFeOjJG05+EkvAFc0xhTDyU2Lg/AZXBMOj/Lg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NtUU/MJn; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NtUU/MJn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736774188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=UR4wOvOvGflVtkj0lDcKzvypIv6wkOeGsjA69y9N42c=; b=NtUU/MJnegLlXx3vvfxK9gKrovXYbb38JbH9cacTbZJmGK4p7C0dov88yFv5Vw1Gu2x4uC lKVhFEx5Z0zf/udCV3AuvhFIrdKEm6EBjzaTPkDJaaZkPQrjJwRRfXzoZh2HjKSDGuQ+7c z8IE0zLs8bMjKkQvxDDSJjvoQX1T5nM= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-74-3tRLe-sNPQi_RowNVhLb3w-1; Mon, 13 Jan 2025 08:16:26 -0500 X-MC-Unique: 3tRLe-sNPQi_RowNVhLb3w-1 X-Mimecast-MFC-AGG-ID: 3tRLe-sNPQi_RowNVhLb3w Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-385ded5e92aso1526573f8f.3 for ; Mon, 13 Jan 2025 05:16:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736774185; x=1737378985; 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=UR4wOvOvGflVtkj0lDcKzvypIv6wkOeGsjA69y9N42c=; b=e2cIAiG4kaRAYQijymOjFBdTnIbQIb3vcAVN7w2fcgAfMXgGVcMQxCmfCM1cRNtbHQ smrG0iZdxu/oxwOQhqQyQ5eILvXL1QrOKYhbkN0C6wV/BMOuUadsq6xcD6aWHh4Yr3zy HrRrER7wBjd/GdfGoIOBlG8yROCKT7nXwfvO/B4RsPyEQQDeRf8o/4z+C+/iAVlwtdhn 22eOYCoZ9W4Vry+/SKjwXlyOTKUsj4p5xOGpkhinZqIUkcbIax3/SM8qNP0ZoZfnWzix /4wtmAzf6HHFVMCJBfztxP3MXVH81/GaxVrKIDp9dRBccs7OzW2Wo7SWwn97xQ9tWmJV KNow== X-Gm-Message-State: AOJu0YyrP4kDOY47GDAcHhUUGYhw1uWIVLAgiQuxqWxWrG+RgeJfO8dP y2ZeSmk5GZAYAp48+hF+Lin1EYbm53c2daAMikVG+rUedyVYgWVMOLIq6l4f13I7cZEj+hTsF8R hrVw8QOuD93whFMNVawfmMPkSdoIFLFiMvNIDkGiB+fOsb2cMoflcs7jcdDZWgLw+kORN+iA2FB 0h2u1HHgfRR9MRz/5Esx7G/cjwcZYxux3kpieziPVbldbq X-Gm-Gg: ASbGncs7qptL/09HBeRaJoJXdi6wh4M2+nlFFKrGRBU91T9CZKYGzJtDgX1UzXRjOFJ dWLGHAy8CM217vdzwLxytEordYCH54DRfhf3EoWpEieWY5GnRDV2Qfk5Uy3sK7DEOXdLwKMtzDh t/j4lNNcA98f6UPrBHt5uyT8mQGzslNX4QDHU8fTnObugPim2BwSQOPh8KulIDU6AoeN9Un+Vg/ t6qF4mmxmcQnPgdjG6mJX3UsyUQB8fVZwjaXEMZmG0069H6sEII X-Received: by 2002:a05:6000:4024:b0:382:51ae:7569 with SMTP id ffacd0b85a97d-38a872e164dmr16467533f8f.18.1736774185360; Mon, 13 Jan 2025 05:16:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwdpWPSLxChop2aR9ZwIcVPE+udVordnwL/Gwf1UX4aw/QxmRmKohGcqwW/ULPnUXjAigUgA== X-Received: by 2002:a05:6000:4024:b0:382:51ae:7569 with SMTP id ffacd0b85a97d-38a872e164dmr16467495f8f.18.1736774184965; Mon, 13 Jan 2025 05:16:24 -0800 (PST) Received: from localhost ([2a09:80c0:192:0:5dac:bf3d:c41:c3e7]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-436e2dc08eesm179901795e9.10.2025.01.13.05.16.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2025 05:16:21 -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 v2 0/6] mm: hugetlb+THP folio and migration cleanups Date: Mon, 13 Jan 2025 14:16:05 +0100 Message-ID: <20250113131611.2554758-1-david@redhat.com> X-Mailer: git-send-email 2.47.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 v1 -> v2: * "mm/hugetlb: rename isolate_hugetlb() to folio_isolate_hugetlb()" * Use "-" vs. ":" in kerneldoc * "mm/migrate: don't call folio_putback_active_hugetlb() on dst hugetlb folio" * Also care about activelist and adjust patch description * "mm/hugetlb-cgroup: convert hugetlb_cgroup_css_offline() to work on folios" * Extend patch description * "mm/hugetlb: use folio->lru int demote_free_hugetlb_folios()" * Also use "new_folio->mapping = NULL", and calculate new_folio like __split_huge_page_tail(), adding also a comment. * Adjust patch description 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 | 54 +++++++++++++++++++++++++++++++++----- mm/hugetlb_cgroup.c | 17 ++++++------ mm/mempolicy.c | 2 +- mm/migrate.c | 20 +++++++------- 8 files changed, 74 insertions(+), 37 deletions(-) base-commit: 0703fa3785f1b969a3a98fc9bb3e4ae5062684ea -- 2.47.1