Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp551582lqp; Wed, 12 Jun 2024 09:09:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpTuN+OYbe6e/WRi6/DP8k1LXHrKceRJ0grEtdfTVSSxD7oMjjCleJD067xjffTUJU2zj1R4R+dxt+w/buubByulzCyVLCxSmUOySIlg== X-Google-Smtp-Source: AGHT+IGeb5ZLICy7z6Z9k8G/2Po6Ec8dlJ+hHGV73hWw5NtPlfid/E3O83dYVWBh17bfsdeQcQli X-Received: by 2002:a05:6358:569f:b0:19f:5b6f:bd01 with SMTP id e5c5f4694b2df-19f69d88be1mr287142355d.26.1718208581383; Wed, 12 Jun 2024 09:09:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718208581; cv=pass; d=google.com; s=arc-20160816; b=rL4hZWOqqL5Pjqsl17DejoUELvPJf+jAxBkZq/42dVaWNf7aY3Ea+1K/IPfZrbSbBg IDm9ZC0mHlMWmE3X0ZL4/wsYk77vZV4wlcbI1NVJEingVWSiwCIOYwcldFibQBydtxOb uXcjSIOF3QtO69plgTb0CcQ5llwofN34PFZK9mqaR3YG9bJoeIHzzDLBEqR68ZmNgScI rWeLfOTDXo6LryTTlM6lC+XaQ0ntl8mxw92GmcZi8R+/YFTH3lE2Qrkxk0YkG7xgh/jN zngCiRmRAlvQZ/KfONhgEEBA07Xhd27RdUPMHBIDjzBxrSAtqRdVuQhs4r5/kv+ZM+va 9jCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=AdccrOhf88uz5pRDwrrb1HohSX2xWhLpPPv/9A9+SwY=; fh=wKHeCCQXnup9nlV9i9RDFe0hGCJjU1U50Buj/4jFy/E=; b=czbmyKCITn9rTJ01QMCEg+RzyfnBX5V+gLfHoY9umxjeXfeMutzDPX+6laHLCU7YlZ ferNDEQrxL7yUqthCXDujUXYx9MwaKwxZi+4FzQiMCuCpK/2dnSTAcXkMjXrcKBLu42M 6bKdcL/soJT0bGAZZ4kGKZbAzE9Sd/OobucqnuGI/Avmcc8GxIel5YsTRORtoSuzEEj/ /51n+/ny3HDZeOLXc2WD51s30EY//F33AlFV/HLPFSKlhZmH+iUfhvzfXmwE30d/MLYl P6gKxWjqCRnt1NZ0jcst1VFM/Tfecm0knQY1NDS3k/0bJKTFNz67W/1Y1Kg+5ibWJyr2 j0RA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="C/wojmib"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-211858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211858-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e3ba9502edsi8094333a12.261.2024.06.12.09.09.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 09:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="C/wojmib"; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-211858-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211858-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1A6BC288722 for ; Wed, 12 Jun 2024 16:04:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87CBC181BBA; Wed, 12 Jun 2024 16:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="C/wojmib" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A5DD51822CE for ; Wed, 12 Jun 2024 16:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718208041; cv=none; b=cYsnuqKAGqEzXq3zzJkw9h7IqOkt+JXqpqgw3EcCItzIhDkZtM8hCbwh5HxyN9yQoGLF5P1X1OaxCiqGzFd7znqWNjIlTzcojKyQ8IluRDAUpFw7dHIp3Mf/vP0qE3xIF0NUA2cYZaGgz7GX6OHKX2ouz2PGW4yZM8fbkVZlZVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718208041; c=relaxed/simple; bh=6Dj6THRj+i4dDXGDhbJq/b5ZEprPGb16YF9d3o2hP8U=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=YBmUft258sd772bODfTsMc5uMVjHJJTIFxnyaVve7pixehsZgfyCX+KihDjolxxxJXOetZQ1V+jzzbjBFnzE6N6TmqW33YGgd20ziqbp6W75/a3uHxM8vhMhtsOUgMbTCJIcjuoFzh+HpMa/K20WMprvmjyrZTNmTmHezllVHIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=C/wojmib; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40796C116B1; Wed, 12 Jun 2024 16:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718208041; bh=6Dj6THRj+i4dDXGDhbJq/b5ZEprPGb16YF9d3o2hP8U=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=C/wojmibINCCfGxwyxeUp3zJk5SwfhlMG5IVAwKr2sxAjndRyFJ0ovSt9K0X9her0 iRnUdvQ2Z0IG6DKVJb97ZCWStxgzKOwSkW4blo2IOW150aAyUwWp54TTxjPzDcQRX2 irTHkYc9JpXxJ+C+dF4itzt/MYtrD1CpOBvLDFCs= Date: Wed, 12 Jun 2024 09:00:40 -0700 From: Andrew Morton To: Hugh Dickins Cc: "Huang, Ying" , Zi Yan , Baolin Wang , David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH hotfix] mm/migrate: fix kernel BUG at mm/compaction.c:2761! Message-Id: <20240612090040.090c20a398f3e9eb550e1a9d@linux-foundation.org> In-Reply-To: References: <46c948b4-4dd8-6e03-4c7b-ce4e81cfa536@google.com> <87msnq7key.fsf@yhuang6-desk2.ccr.corp.intel.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 12 Jun 2024 00:11:44 -0700 (PDT) Hugh Dickins wrote: > > It appears better to add > > > > stats->nr_thp_failed++; > > > > too. Otherwise, if migrate_pages_batch() is called via migrate_pages(, > > MIGRATE_ASYNC, ), nr_thp_failed will not increase. But if > > migrate_pages_batch() is called via migrate_pages(, MIGRATE_SYNC*, ), > > nr_thp_failed will increase in migrate_pages_sync() via > > > > stats->nr_thp_failed += astats.nr_thp_split; > > > > That is, they are not consistent. The issue exists since commit > > 7262f208ca68 ("mm/migrate: split source folio if it is on deferred split > > list"). > > Sorry, I'll have to let you take over and send your own patch instead > of mine - thanks. Those stats, and any attempt at consistency there, > is way beyond me! I thought consistency was impossible, unless all > the numbers were changed to order-0 counts. I'll add this patch as-is for now.