Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2126097rdb; Mon, 9 Oct 2023 13:32:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyOJUfHR/sC34F/1jceUZEKVSAJ0iT1hGmJMz6OBTGedlXEaH+jDhHmnrUxELuiONwPAQY X-Received: by 2002:a05:6a20:258e:b0:159:c24f:5fa4 with SMTP id k14-20020a056a20258e00b00159c24f5fa4mr16127135pzd.1.1696883575783; Mon, 09 Oct 2023 13:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696883575; cv=none; d=google.com; s=arc-20160816; b=xqX5drUW7/vF2VJYqQmEI/Cd21bVqnJlXGO+sVtQVO0MMPp1ABswnxqvvvDab3nHdl 4AXfumPG7DK0YcM5QOIiC2e6L13zFPCEjzLZFKYZC+LTFvAoTURTxuH1f9EnxfXUNJgR KHteinN3xdbJGD4vBc8STASxd3k62gdWmHrMN473/Fqu8vloUSSGfSHBiSMJfYAmEmdR tN0zXMSGO4Kx0PVKUGFs3LtnboYyBw9SK/PQDuP6pK19SqjGkkRPZl3eI7iqsdig3Pb3 xC34nE8QAjosCpIAlqSz449m3H23pcwTqZ72ZNirRRxGW7M3DABLPLytVy4c761YMXNE /uMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:reply-to :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=JPvpBZP1SSiqvBRF9ydN+g0ZFANiZsdjFQ7+amB/n1s=; fh=cCnZvojZaURT8jH5vmOig0nNKc285jQ0d11KMSgr4+U=; b=oKH3EZQldHeMmQ2VT5Ot++5CfqXXmU+TggdTdnnIh2T1CJfP6lcfXt4ToNvGJFriGT kzTGRjKpzc47HPdTuLSLltrN728EAMUBrX/d4EBrOk1ENYcChxbsbi1jsC2DgWqqkul3 XqCqxACuUlJbmOgH7FgiysAM6CIMeU1wXvqzT7fnwxjM8/wvd0lCujxTHAVG+Uw6Nz6v YpVDZNPGB0sIu7gT4u00o2xGNSoIR4UsKC16PLJ+bSdFbWrcyUKrJ2h4EKUZZvHBrZLQ c4QOBGS/OdQBCk+atvD1XXhfXIlDVB5Cukx8bfoOLgAafqyvcKXgVOCIoGLWjbEurbZj /t9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sent.com header.s=fm2 header.b=eXdStKJ2; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Ha1tRQ+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sent.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 20-20020a170902ee5400b001c42b2b02casi10151086plo.174.2023.10.09.13.32.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 13:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@sent.com header.s=fm2 header.b=eXdStKJ2; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Ha1tRQ+k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sent.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id DF42080330D5; Mon, 9 Oct 2023 13:32:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377753AbjJIUcq (ORCPT + 99 others); Mon, 9 Oct 2023 16:32:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346654AbjJIUcp (ORCPT ); Mon, 9 Oct 2023 16:32:45 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 350859E for ; Mon, 9 Oct 2023 13:32:44 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A12B15C02B9; Mon, 9 Oct 2023 16:32:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 09 Oct 2023 16:32:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:reply-to:sender :subject:subject:to:to; s=fm2; t=1696883563; x=1696969963; bh=JP vpBZP1SSiqvBRF9ydN+g0ZFANiZsdjFQ7+amB/n1s=; b=eXdStKJ2pUQ8PIxQKv v4+49A47wjAImQwoLH2c9IWNdyCam1VBVuLz+McMZoPKxDRdxoOYIRCBRQducQR2 WfM2TuASvkyffQNdk9oFuFANUnk+4AQ/Fue6JYRdYw7XM9EfN/kpfFudR2Z9KM0a FMIeJFp751MvE2jeSz2I5wTB6ZO2UyjsLwlS9dWVyNX2316+O0oAD1Ou2xnKiKJT oQH5iSKi7F3lPORxiGkWp+ZieyeHw3BZepFlgetSkTDJxdmeF1Go4XiO20X09hpL kxK899lKSbaI31hk+OiY6anY+25Wn7VB3cFdYE1OGFxb+7CEO/FeaorveYoarwFT SY8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1696883563; x=1696969963; bh=J PvpBZP1SSiqvBRF9ydN+g0ZFANiZsdjFQ7+amB/n1s=; b=Ha1tRQ+kVnqQxBJUW 8EXwUIBNS5fH98GQgY8Lpb+aSAXu9/UPJZq5f0z12lKqQ1XPql/iPGB8K+PS8XzG lbPEvqRmWfVWNSWh5wJeuthxxqrcQjN5Jl7/djL/PjOqwLdE86pF+5Eeu4hrJkqI mw5fV36KFlmVg+NnzMxLLNVWOrBUSaBYoGPKngcUiQiEveiBpu9fKBYeMRC0r8L1 G5oCI82lUGZrN2KTGhtS/cbGyqxOGACP5ZdiDKEHscmyiK5+aJMPHSeJiWOaAbMT Ekj++sOuSOf6ZRtL40TRcr68ZqRctc/1Cthp4yR7BZJQhHFyq+ZgFkPinrH59E+X I77OQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofhrggfgsedtqhertdertddtnecuhfhrohhmpegkihcujggr nhcuoeiiihdrhigrnhesshgvnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpedtgffhtd etledtkeeihfefueeuhedvudfhvdeifeevtdektdetgfeiieejuefhtdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeiiihdrhigrnhesshgvnh htrdgtohhm X-ME-Proxy: Feedback-ID: iccd040f4:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 16:32:42 -0400 (EDT) From: Zi Yan To: Huang Ying , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Zi Yan , Andrew Morton , "Matthew Wilcox (Oracle)" , David Hildenbrand , Baolin Wang Subject: [PATCH 0/1] Large folio migration fix and questions on migration stats Date: Mon, 9 Oct 2023 16:32:30 -0400 Message-ID: <20231009203231.1715845-1-zi.yan@sent.com> X-Mailer: git-send-email 2.42.0 Reply-To: Zi Yan MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 09 Oct 2023 13:32:53 -0700 (PDT) X-Spam-Level: ** From: Zi Yan I am adding support for >0 folio compaction and find the VM_BUG_ON(!list_empty(&cc->migratepages)) in compact_zone() can be triggered when a large folio is tried to be migrated, split, and its split base pages are not migrated. The fix is in patch 1. In the upstream tree, large folios can be migrated via move_pages() syscall and there is no VM_BUG_ON in do_move_pages_to_node() but pages left in the source page list will not be returned to LRU lists. This is from my code inspection and I have not reproduced it on upstream tree yet. In addition, I wonder if we need to add any large folio migration stats in addition to existing THP migration stats, at least for large folio split stats. Otherwise, large folio migrations seem to happen without any notice. Thanks. Zi Yan (1): mm/migrate: correct nr_failed in migrate_pages_sync() mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=20 2.42.0