From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id AEA2380E93 for ; Wed, 28 Oct 2026 13:50:42 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SDnS2E020474; Wed, 28 Oct 2026 16:49:29 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SDnS2E020474 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="UdIZyV66" Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SDnKb8020444 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 28 Oct 2026 16:49:20 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SDnKb8020444 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48c430f0f01so819533f8f.1 for ; Wed, 28 Oct 2026 06:49:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvByBOobp8BEn8gVlYXF/eVj05uzmCeY8dbIs8ckxN0irf2H2TCYXCsgUs8RSK7iuDNQIqghqgw==@openvz.org X-Gm-Message-State: AFq9FYLPBef1XE0+0JPqosi02P8aGmg0OenvSJJViLDqQOeyNGr9FvLA QSsVJhWWWv4JPkdHdJ0N41UB2E8BkoLdKj2wLJwX1YNW/GERZ6lAptKExZVPkqtHLKavv6zBqVg 1PJ/IDHXMfUIxCBq4zflq/4XvSGpzBH9D7vUT7dPES7u0gkn+BHSnDQ== X-Gm-Gg: AYBFou2a/okLQT5WAybU9wd7WI7gQmroaab3cpPXE1+vlukl9Mdzyhy4uMVV4qGv7D5 S4FQ5YgooC6lBiqZEP1n6kNDaGzqxalryagiDVThjuyEuiqle22rL2l5Am89fm45oDtJjICgBtb 2Sy4XPlhHB94eFlj1NCO0wwnJ4Js/mJq3UUPBQfA0Kw3HSkrGZ3pDMo2h04Vcp+sqiRe2DEmPMn W7jUR4cJ6SKyujiUOqfnNITj36Jgu/CkywYEo5WtpbhwNsUSeOv0x08jBWmbwdejfChoSg0syXf 1CBMRKkDyBwah5SpMU8vcQFUxDKkL3/jjESH9VRFQwYKws1h4pC4e23yUfq6w2ey14THHpQdfPE AOdwNBTjX4hS92JKp X-Received: by 2002:a5d:5f41:0:b0:488:8232:d16e with SMTP id ffacd0b85a97d-48e5d564866mr6552687f8f.45.1793195359945; Wed, 28 Oct 2026 06:49:19 -0700 (PDT) X-Received: by 2002:a5d:5f41:0:b0:488:8232:d16e with SMTP id ffacd0b85a97d-48e5d564866mr6552614f8f.45.1793195359282; Wed, 28 Oct 2026 06:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793195359; cv=none; d=google.com; s=arc-20260327; b=cial2QUiV+R0Q/J7a/bPvvvvL7iesp5HjcM2qQ8NuVohwx5fJiAK4rwSkL8UqTljbd aCbVP6zMI5600YH/yfW0fLdFtTw1j4hFDJA5ixsgVBppy7lfBaHhyGiLHDE8MSoPhr4+ OT3KYaglkuXXCUYtUTfeUCAnpOGXvCgT0vy/hvw5951WxoZmuG04wlJ0w98yqgW3dgQL oALYuhMekk7DuqlDfN4MsQgaSBkh0vwlo25wpgfsjSHLOUDgh/2yGHPFoWCky1/4yBsl 5wORZlJhkby+zJdPXTqDptm4lLCyDsN9uyXxv8Wu74uC7CPFSK6l0Rd945deejJQK556 T1Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=StaJmLHRwwhDLrFbplyhNhlACqHB6LnaHdx35d/8Q/4=; fh=bRkZfFa6377EgOVW8zBDri2gGIQqe/ZeiH+ijEM/ROI=; b=XYaSK0s+EcPIoLb6L94k125JN77B3erfgKkXm0F8hE6e18SpoQ6BcZIddUkeVQ453i izXFQfNi3py/e7XUCx17/4w9JklI9BLuND8c1GQg24fMzGILyA68AwGGRFmCceSUArb2 5p4Snqj2nMIMs3jJNkwazowE/H8T+1kFKGg1JPY6sIgq/Utadu6Et9Jk2T0NsXWKLCn+ Z/9sKl6dHQLaKA2yX0+UuOr059bw8KaJcVvLmz1yFRrmR+WtjeBGIr2+zd74pWHPjXBq IWg6BwhuO/1dPvgl7FPuY+HVX8l6N2Mg20Gm18quW6zwkYTteT9bVi+xgH1Wca/Nr2sB 83+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=UdIZyV66; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e3ed148a6si28750711f8f.373.2026.10.28.06.49.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2026 06:49:19 -0700 (PDT) Received-SPF: pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=UdIZyV66; spf=pass (google.com: domain of khorenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=khorenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Message-Id:Content-Type:MIME-Version:Subject:Date :From; bh=StaJmLHRwwhDLrFbplyhNhlACqHB6LnaHdx35d/8Q/4=; b=UdIZyV66TQnQZ+ziOQ8 jIyliZ7IWLmZVU0Q6JtSU0wAZX1MaaAuV+TC+k4adM38o/Sqz+pxRSVTjaHJNG4g99kVLhHIdmqbQ T1FXK5rdsTLmxggTFFr/EV6WvJA9w1ospAhStH4+0O8IjIksa23jWc4QDa5jAxEbESw3+MNuV8+ZT je/N8w/fVta0vO6QhstzEL7l6XgyRcyuGqHWVTJt7VFUCIz34+6xTLO/nEWvj5nW4zHFySRoXncY4 rZuEPvToWQy3z5NTu79sG0uzOyOh2z1XcS7XwH9jld0rn2oKzrryf1Uk3mhYE+6URtvTvzmZ0U3Os fRHcbo1tk+l4iMg==; Received: from ch-demo-asa.virtuozzo.com ([130.117.225.8] helo=f0.sw.ru) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xM3y0-009ApT-2d; Wed, 28 Oct 2026 14:49:18 +0100 From: Konstantin Khorenko Date: Wed, 28 Oct 2026 14:49:16 +0100 MIME-Version: 1.0 Message-Id: <20261028-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v1-2-aa959eecd3fd@virtuozzo.com> References: <20261028-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v1-0-aa959eecd3fd@virtuozzo.com> In-Reply-To: <20261028-b4-prep-khorenko-vstor-152197-numa-migrate-cleanup-v1-0-aa959eecd3fd@virtuozzo.com> To: Pavel Tikhomirov , Vasileios Almpanis X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3274; i=khorenko@virtuozzo.com; h=from:subject:message-id; bh=aDyKfoUsQ+ypab76RdiAIXnpJpoL0dMSuuDQubkdyAE=; b=owEBbQKS/ZANAwAKAVGWCkf5YVwqAcsmYgBq4f1d6FPGdZK4UKhotOXpXlA0+q5Ce9i5uZRnj gokfqgjdGaJAjMEAAEKAB0WIQRWD23IPcXT0GO9CCxRlgpH+WFcKgUCauH9XQAKCRBRlgpH+WFc KvGlEACx9dDozeaDbqYqd78TSsY39wLpPiP5/dz7vN9IclfPiPr7E6fgsJ/N/vUDk+ync6AGBy9 ISA5zlSx6nVE+jW8dBfNp2aSkSc8OoYUNT/8d/7aa6Ar7k+4pB9WzEw8xY6CdwnzPnr3eq2t+03 ct2k4TU71ahSKAnjVfxs6T945GiKjYJlBj9JaldBDwPgBJ+vvMfW8bU7oHZE0+XLtYL0nmdwesY fKywKtvZn8UjHjB3RPRthOIBsU14OHMOr/1vZHFfTxahZNgTz9H2c2cTFAeLhGfLwH0lyrl6ipk blCudn16WV5QKamP4qNvXMjzFlh7pcSdXmCRvTNN3yuqmRg3eWUc8rikr32Rj09Ld0KTycOEch4 5wrm9w/FCXd2yVtvunE99ZEV8iHGe+1GcCqVtLpBp7SAqVKGY5j1xcWNz9y0PY6LXJ4IACrrXGT uq+jzJtU3YGzAchzzpOtXtO0J5JlKQ75rBhLyLmoFtLVpvXUG8LYz/UKnxXK3tSxlFYXP0rSHlb qdyanzHff33dW4u3ZMaDmmRlVZ87oqx8rvkS8Kq+GonG3G8Mb/1v5vRtJW5WrL+o/uE4hC7KDtU tkN7Omls212/9N7Qa2bgKQqlsGsE53qlSZ2ctuJe0oGbQgd+ZmvkJUyFvrv0xymB7RFPks5sXPv bymI70ITbResPqg== X-Developer-Key: i=khorenko@virtuozzo.com; a=openpgp; fpr=560F6DC83DC5D3D063BD082C51960A47F9615C2A X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 2/3] mm/memcontrol: say where the numa_migrate code comes from X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org The comment in the isolation loop tells the rebase history of the code instead of naming the upstream functions it copies, which is what a rebase has to compare against. Replace it with those names, name the original of the allocator too, and drop the leftovers of the copy: the commented-out conditions and the pre-folio name of the allocator in the comment to its private argument. No functional change. https://virtuozzo.atlassian.net/browse/VSTOR-152197 Feature: mm: interface to migrate memory between NUMA nodes upon userspace request Signed-off-by: Konstantin Khorenko --- mm/memcontrol.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a82d5e7bc8694..4c3c06cfcf9fc 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3462,7 +3462,7 @@ int ve_enough_memory(long pages) #ifdef CONFIG_NUMA /* - * memcg_numa_migrate_new_page() private argument. @target_nodes specifies the + * memcg_numa_migrate_new_folio() private argument. @target_nodes specifies the * set of nodes to allocate pages from. @current_node is the current preferable * node, it gets rotated after each allocation. */ @@ -3473,7 +3473,8 @@ struct memcg_numa_migrate_struct { /* * Used as an argument for migrate_pages(). Allocated pages are spread evenly - * among destination nodes. + * among destination nodes. The order and gfp choice follow + * alloc_migration_target(). */ static struct folio *memcg_numa_migrate_new_folio(struct folio *old_folio, unsigned long private) @@ -3520,19 +3521,10 @@ static long memcg_numa_isolate_pages(struct lruvec *lruvec, scanned++; /* - * Previously here we had a call to - * __isolate_lru_page_prepare(page, ISOLATE_ASYNC_MIGRATE) - * => need to get same parts from __isolate_lru_page_prepare() - * like it's done in isolate_migratepages_block() in commit - * 89f6c88a6ab4 ("mm: __isolate_lru_page_prepare() in - * isolate_migratepages_block()") - * - * The code block below is taken from - * isolate_migratepages_block(), mode variable is defined and - * set to ISOLATE_ASYNC_MIGRATE in order to keep the original - * code unchanged where possible. - * - * Also it is switched to folio, based on isolate_lru_folios(). + * The checks below are a copy of the per-folio checks in + * isolate_migratepages_block() with mode == ISOLATE_ASYNC_MIGRATE; + * the isolation itself follows isolate_lru_folios(). Keep both + * in sync with their originals on a rebase. */ folio = lru_to_folio(src); @@ -3552,7 +3544,6 @@ static long memcg_numa_isolate_pages(struct lruvec *lruvec, is_unevictable = folio_test_unevictable(folio); /* Compaction might skip unevictable pages but CMA takes them */ - /* if (is_unevictable) */ if (!(mode & ISOLATE_UNEVICTABLE) && is_unevictable) goto isolate_fail; @@ -3567,7 +3558,6 @@ static long memcg_numa_isolate_pages(struct lruvec *lruvec, is_dirty = folio_test_dirty(folio); - /* if (is_dirty) */ if (((mode & ISOLATE_ASYNC_MIGRATE) && is_dirty) || (mapping && is_unevictable)) { bool migrate_dirty = true; -- 2.43.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel