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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 35A1CECAAD8 for ; Tue, 20 Sep 2022 08:55:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8FAFD940008; Tue, 20 Sep 2022 04:55:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AAAA940007; Tue, 20 Sep 2022 04:55:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79A40940008; Tue, 20 Sep 2022 04:55:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6B7F2940007 for ; Tue, 20 Sep 2022 04:55:11 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 3B08341D0C for ; Tue, 20 Sep 2022 08:55:11 +0000 (UTC) X-FDA: 79931854422.09.142A365 Received: from outbound-smtp48.blacknight.com (outbound-smtp48.blacknight.com [46.22.136.219]) by imf14.hostedemail.com (Postfix) with ESMTP id D4FD5100014 for ; Tue, 20 Sep 2022 08:55:10 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp48.blacknight.com (Postfix) with ESMTPS id 29773FA7E2 for ; Tue, 20 Sep 2022 09:55:09 +0100 (IST) Received: (qmail 17326 invoked from network); 20 Sep 2022 08:55:08 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.198.246]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 20 Sep 2022 08:55:08 -0000 Date: Tue, 20 Sep 2022 09:55:02 +0100 From: Mel Gorman To: "zhaoyang.huang" Cc: Andrew Morton , Zhaoyang Huang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, ke.wang@unisoc.com Subject: Re: [PATCHv2] mm: check high-order page when free it to pcp Message-ID: <20220920085437.ngyrzgxe2uoi7g4a@techsingularity.net> References: <1663634940-6515-1-git-send-email-zhaoyang.huang@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1663634940-6515-1-git-send-email-zhaoyang.huang@unisoc.com> ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf14.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.219 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663664110; a=rsa-sha256; cv=none; b=8hYREpztanSQGEQnQDUcC8dy859II6ATULvxwmoyTDE4y0Qw5IbpY98cXGNW6BYR6Xx6cJ YIPEvfsFsbY7l1QPHKl0Z0D7iITkSCtiIqd8ujQc68I54nn7k/kHoI27tkqBoNVvnn4sCI AuyZlSprqEB0ieN6+o7HRLeGkGtXnEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663664110; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gAHl0quD4v61jdMxenapsRkq2S//y55iKqiwPO93T9w=; b=iEy5oiX73unJTCoyZOqWmR23PceQ/CZJCXLQGuXvOKVyyJ7eJmMaf2iPYasPipFTda+Yxg 4bSjD4mDZteJwwcFZIAKYaO0YMXrLOF0gBP1sNtOU9GQjRGxkZJLmRXZ+tx7pdK1fiCq8q PahTeS86H870UDZ/4vHRcLZAAAQAzn4= X-Stat-Signature: 1ybaj876gqda69p715wje18cuzde18rp X-Rspamd-Queue-Id: D4FD5100014 Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf14.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.136.219 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1663664110-542400 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 Tue, Sep 20, 2022 at 08:49:00AM +0800, zhaoyang.huang wrote: > From: Zhaoyang Huang > > High-order pcp page escaped from checking when both of DEBUG_VM and debug_pagealloc > are all disabled if it allocated again from pcp_list without going to global > free list, which should be introduced by 44042b4498. > > fix:44042b4498 > > Signed-off-by: Zhaoyang Huang Why is the order check needed? In this case, I think the comment itself was wrong and should be corrected. free_pcp_prepare is called when dealing with a PCP page being freed and these days that may order-0 or high-order pages. Wieh DEBUG_VM disabled, the pages are checked in by bulkfree_pcp_prepare when freeing pages from PCP to the core allocator. Why would just high-order pages be checked in free_pcp_prepare and checked again in bulkfree_pcp_prepare? -- Mel Gorman SUSE Labs