From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85295C4338F for ; Thu, 12 Aug 2021 10:56:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2CCE36101E for ; Thu, 12 Aug 2021 10:56:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2CCE36101E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 521D18D0007; Thu, 12 Aug 2021 06:56:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4AAC18D0006; Thu, 12 Aug 2021 06:56:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 373848D0007; Thu, 12 Aug 2021 06:56:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 1AC4F8D0006 for ; Thu, 12 Aug 2021 06:56:12 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id ABD68204B8 for ; Thu, 12 Aug 2021 10:56:11 +0000 (UTC) X-FDA: 78466124142.18.992A34D Received: from outbound-smtp56.blacknight.com (outbound-smtp56.blacknight.com [46.22.136.240]) by imf22.hostedemail.com (Postfix) with ESMTP id 1B8A883C9 for ; Thu, 12 Aug 2021 10:56:11 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp56.blacknight.com (Postfix) with ESMTPS id 5AD19FAFAC for ; Thu, 12 Aug 2021 11:56:09 +0100 (IST) Received: (qmail 10232 invoked from network); 12 Aug 2021 10:56:09 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 12 Aug 2021 10:56:09 -0000 Date: Thu, 12 Aug 2021 11:56:07 +0100 From: Mel Gorman To: Doug Berger Cc: Andrew Morton , Vlastimil Babka , "Peter Zijlstra (Intel)" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: don't corrupt pcppage_migratetype Message-ID: <20210812105607.GK6464@techsingularity.net> References: <20210811182917.2607994-1-opendmb@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210811182917.2607994-1-opendmb@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 1B8A883C9 Authentication-Results: imf22.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf22.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.240 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspamd-Server: rspam04 X-Stat-Signature: bydpwaosowwrmrmtjsstxuq6x75hei6f X-HE-Tag: 1628765771-553924 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: On Wed, Aug 11, 2021 at 11:29:17AM -0700, Doug Berger wrote: > When placing pages on a pcp list, migratetype values over > MIGRATE_PCPTYPES get added to the MIGRATE_MOVABLE pcp list. > > However, the actual migratetype is preserved in the page and > should not be changed to MIGRATE_MOVABLE or the page may end > up on the wrong free_list. > > Fixes: df1acc856923 ("mm/page_alloc: avoid conflating IRQs disabled with zone->lock") > Signed-off-by: Doug Berger Oops, yes. The impact is that HIGHATOMIC or CMA pages getting bulk freed from the PCP lists could potentially end up on the wrong buddy list. There are various consequences but minimally NR_FREE_CMA_PAGES accounting could get screwed up. Thanks Doug Acked-by: Mel Gorman -- Mel Gorman SUSE Labs