Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3638744rwb; Tue, 20 Sep 2022 02:30:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4p5yTH+4dsU8/BrEUAsSjdxLGPXKb5L9etqtUb9+6hgGNSYlkothSyJzzdJGICjaNFE0zf X-Received: by 2002:a17:907:60c9:b0:77f:be6d:d870 with SMTP id hv9-20020a17090760c900b0077fbe6dd870mr16141703ejc.348.1663666221961; Tue, 20 Sep 2022 02:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663666221; cv=none; d=google.com; s=arc-20160816; b=jbSY4Oz1wuUN9MI4BHmViudnF90/8nb/zUxFS1BiHzGK2tXZJDi72/owYqLeoQ87dX DvbI4r/mKSLcW/t7297NYVb742bCQZfthYcVBQgUnKVSKehoJqNSduI585a5dP1UquPS Aa5uKprD3SdXytcOYahsrzVre+TcG+vhBOH0vehZ+ZWYfxGuNwlLvosK40dtBf63S68y buYbBv0I3hNqoM69zn3DmTKzDc1ZYrgF1tn0ftQdC1FPbq2PbRIE82sIrRKW1xwQ4k7I JawR/cG+fnQAph07noJosSUaGxPAbtOe1iBG+6vGXSdr7nuUMcf0YwKjk3iSebpuvgIs eN/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=gAHl0quD4v61jdMxenapsRkq2S//y55iKqiwPO93T9w=; b=qcMwaB5fB8aui7MS6Fzqc3uZf3PP7t9SEc6UzJBwq54kTaYLSS73EewYdROqEAASTm DApCcnWPNU2/Mzz/rdmgCxdjT3iN8wMgKG8jNCXhaMrklk31W9y/XFcX3iPSQXr6uNTN DG1sV1uoZnpBpVqoGDV8d7C3yxP6Fj4xA41aUpObAuLt9mMGOdcFCSxNU2fHoPCVtje+ BUxjgI4HHs8yicAixUYuXUS8r8VEKs+8YVuXcBgI4D/kipWb9rypFhiK06rXuo3Gn8ZH wObNvEq87FI8S4BQVPN6szSNE804tbfb3zKNqz8cOAE3g7ovR1OFI+S/Cytjtt1vgVLI eenA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a05640242c100b00448da245f3bsi1546241edc.6.2022.09.20.02.29.56; Tue, 20 Sep 2022 02:30:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231426AbiITIzg (ORCPT + 99 others); Tue, 20 Sep 2022 04:55:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231513AbiITIzR (ORCPT ); Tue, 20 Sep 2022 04:55:17 -0400 Received: from outbound-smtp18.blacknight.com (outbound-smtp18.blacknight.com [46.22.139.245]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FB095E569 for ; Tue, 20 Sep 2022 01:55:10 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp18.blacknight.com (Postfix) with ESMTPS id 22B111C392B 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> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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