Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4712880pxb; Tue, 25 Jan 2022 17:18:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxArGM40rumN+6Am/zW+sSHv0vySaYwdxw+s+0fOYj8J4c7oiwvR4WYtQCuDJCs9kZgvJpn X-Received: by 2002:a05:6402:4253:: with SMTP id g19mr14249545edb.152.1643159915108; Tue, 25 Jan 2022 17:18:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643159915; cv=none; d=google.com; s=arc-20160816; b=PBEgD0jNWaLSyTP5Bzv26FcwETT0mkmxmu9FZVdFu+WZ3YgYpiubdn499JWDF6FWBk 3YWcW9/zjQiWWYUaTrN7Roi6xQBouMFUocDtN+EkZcXicD9ykjB3rqBebUGTxlVQzV/d Cozj0Dbb3kdpH9vQ5jG8D7f9BP2VLi6VQrIsHp6KasI+RUgp77/eQDUuRf9pFcyGF+Z8 096UtGmg5binHsukeY+MwatKytlqV46N1M2L6NtWQfpiIEa8eZb2wmc6nnUzat2wMNAL 1pOcNCUC4joo9n04ST4YFO7HdWOmSHmZXZ/bRy1Y2I5Wyu9+8gPD1Ri+riycdqefh6mU q0Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject:cc :from:references:to:content-language:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature; bh=qaT5yS0WIOg+/sXBG6KxbDZck9FEnOBGOKxMbfVHD7A=; b=pqSgkGUg1xFtCxy3B9R1gMlXkPsL6/Tj0CLSNEOAzRzF10Y8sGimzzlyc7VVNXm1um P9GpNiWIMcqanFQng1ZA6keyYTOVwOZOYvFXxRc4pbhFJbhTztfBz/wY85MZEpoJ6Ds+ l15zXOTI9VF5B7h6lnZcDaaKxxsNumlST5CUsTnCwZDKs9BB+wbUHIL7/umeDCigyM+P gykzmwEi1/jBMvWGb/kLNP9kv/Cl+h/XGMoU/vmiKKcxY+DXfqpWzthMxr46w3EWRBct PpMh0USAQiS7+DAu6VnJ9EfffioDsLFWlm2P8bDtXw4/6lRrOwDmJVAtJ7zdRORHU7GB GKXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=BwMmViNl; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j8si10407873edp.379.2022.01.25.17.18.11; Tue, 25 Jan 2022 17:18:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=BwMmViNl; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1451280AbiAYQon (ORCPT + 99 others); Tue, 25 Jan 2022 11:44:43 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:39604 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1584756AbiAYQkU (ORCPT ); Tue, 25 Jan 2022 11:40:20 -0500 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 05CB21F38A; Tue, 25 Jan 2022 16:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1643128819; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qaT5yS0WIOg+/sXBG6KxbDZck9FEnOBGOKxMbfVHD7A=; b=BwMmViNljIgkYsxMmwoUUOHvsw70vBp1Dat2vAEUCJzUAgvs7G+CJi+6Wh6SCVifZXfuH4 nq5ycw0Qgyb5y3OUqOzDKqES+ESdGiKmtmo1DpRTEouqk8ajB+WSpSf68yHrkxTnvmPFGt y2OBa6iNyFJ6dUuJctbvLitjFs1I/NQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1643128819; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qaT5yS0WIOg+/sXBG6KxbDZck9FEnOBGOKxMbfVHD7A=; b=5qugXxX3c+kIqj3wrE4G5dEDqiFLrXFYploVMId5Vnw5acH329Vu/kKRcTzg9p2oW1qn+N YdYoWxkKLCGO2mCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D29EC13E4B; Tue, 25 Jan 2022 16:40:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id fWkkMvIn8GF6OgAAMHmgww (envelope-from ); Tue, 25 Jan 2022 16:40:18 +0000 Message-ID: Date: Tue, 25 Jan 2022 17:40:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Chen Wandun , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, guillaume.tucker@collabora.com References: <20220117142712.3967624-1-chenwandun@huawei.com> From: Vlastimil Babka Cc: regressions@lists.linux.dev, Oscar Salvador Subject: Re: [PATCH] Revert "mm/page_isolation: unset migratetype directly for non Buddy page" In-Reply-To: <20220117142712.3967624-1-chenwandun@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/17/22 15:27, Chen Wandun wrote: > This reverts commit 075782149abff45ee22f27315eced44d02b96779. > > commit 075782149abf ("mm/page_isolation: unset migratetype directly for That's an old -next commit id, it went to mainline as 721fb891ad0b ("mm/page_isolation: unset migratetype directly for non Buddy page") > non Buddy page") will result memory that should in buddy disappear by > mistake. move_freepages_block move all pages in pageblock instead of > pages indicated by input parameter, so if input pages is not in buddy > but other pages in pageblock is in buddy, it will result in page out of > control. > > Reported-by: "kernelci.org bot" > Signed-off-by: Chen Wandun Acked-by: Vlastimil Babka #regzbot ^introduced: 721fb891ad0b There should better be also: Fixes: 721fb891ad0b ("mm/page_isolation: unset migratetype directly for non Buddy page") Especially as that commit had a (inadequate, IMHO, for an optimization) Fixes: tag and could end up being backported somewhere without the followup fix/revert. > --- > mm/page_isolation.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/page_isolation.c b/mm/page_isolation.c > index 6a0ddda6b3c5..f67c4c70f17f 100644 > --- a/mm/page_isolation.c > +++ b/mm/page_isolation.c > @@ -115,7 +115,7 @@ static void unset_migratetype_isolate(struct page *page, unsigned migratetype) > * onlining - just onlined memory won't immediately be considered for > * allocation. > */ > - if (!isolated_page && PageBuddy(page)) { > + if (!isolated_page) { > nr_pages = move_freepages_block(zone, page, migratetype, NULL); > __mod_zone_freepage_state(zone, nr_pages, migratetype); > }