Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4329417ioa; Wed, 27 Apr 2022 00:56:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlQa6SkSlDed0Vk6kIcTPpwdXhoAVBprBI7s/qIEytRy1PJbAU/DhQW7kHyR7aVZ5Niqwe X-Received: by 2002:a17:902:b789:b0:15b:5d52:7542 with SMTP id e9-20020a170902b78900b0015b5d527542mr27353172pls.26.1651046173209; Wed, 27 Apr 2022 00:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651046173; cv=none; d=google.com; s=arc-20160816; b=JESboleTnO0tlxwcBpl56IXElAM6Fnhegsx6E4FnME2ud+TSSXYWRyM/g4m8Z0HPgJ ddZxkDbJq12YekGLhIxnaeTA37bpKu4TATYYbKzwauAmHsLMc0amGlbzXCe9E2ZD/ON4 owj7yOiQBklXeL0x7uhHtJDsyFHvM6C2rUwW05/bDMfSxJ0HXGWm2s1a4P2HAwTYCiWb 35U4Tz+2BETsTezxRYcxmNUBMg60pcxtXSHllekhY8AuB24uLGpIfG2OBTfcNSb+Knvs GT4SFiV/TFehA4XYKES1JV6zytV0yQyXPD9Td8pElE7NAEw7iD8XgUZAH5fa2xHxX/zj ItcQ== 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:dkim-signature; bh=L2aiClk+1ighNnSdgTpBPizL0Y+boQZg3WeLjQ9uEkk=; b=jL9Q4/7AsKAwcQqMPJF4QonEgyPAfN+sNHwdtl3sffsDSVcEgLHzUn3OoDzIi4+Jjr 4sQUvanIFCOqkYvCRbIzyNG6QFld5qDeTUTfFRiwMV0tWpaVvvurBMdTrHDrTFXUHtAC qap/BQdcffx3KC1emJyA2Da6LYkSCt4j5kKgdLMLnBbwjI5u8xuFUSF3uy3U9kOEQVkU jDKOolvMAczTmeFIwZN4o/EDI9YPTtfa31oxJuCV4t5Fc5KBoapXmJWyXXCdHYYzWzu1 0oyNKxn19zK6g8igfXwuJzcUeaG/FP4rCEz9Ck3GlT46OpSWAr3SXjmr8LPD5ikv1Sxx cUBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=oiAiXptJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pw11-20020a17090b278b00b001cd44931fa4si1041233pjb.17.2022.04.27.00.55.58; Wed, 27 Apr 2022 00:56:13 -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; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=oiAiXptJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355252AbiDZVLT (ORCPT + 99 others); Tue, 26 Apr 2022 17:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243506AbiDZVLO (ORCPT ); Tue, 26 Apr 2022 17:11:14 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAE4A6D4F5 for ; Tue, 26 Apr 2022 14:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651007285; x=1682543285; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=L2aiClk+1ighNnSdgTpBPizL0Y+boQZg3WeLjQ9uEkk=; b=oiAiXptJfcklIKNWjdxKeSttUNybZSHHpTfs87Q61/zIYIQo90lj/GFX DNex1lzSVp9zDsXUNOKFgaEgFJq+Xv+ghI/bZ5JZXiRFhilUUWMSrdNGy Ybvhyb8udWKeoXwqIt0WN1wM6VFw/qpTKjlW7OD54gsMHAumdxIHdyqpE 0=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 26 Apr 2022 14:08:05 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 14:08:05 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 26 Apr 2022 14:08:04 -0700 Received: from qian (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 26 Apr 2022 14:08:03 -0700 Date: Tue, 26 Apr 2022 17:08:01 -0400 From: Qian Cai To: Zi Yan CC: David Hildenbrand , , , , Vlastimil Babka , Mel Gorman , Eric Ren , Mike Rapoport , "Oscar Salvador" , Christophe Leroy , Andrew Morton Subject: Re: [PATCH v11 0/6] Use pageblock_order for cma and alloc_contig_range alignment. Message-ID: <20220426210801.GA1038@qian> References: <20220425143118.2850746-1-zi.yan@sent.com> <20220426201855.GA1014@qian> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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, Apr 26, 2022 at 04:26:08PM -0400, Zi Yan wrote: > Thanks for reporting the issue. Do you have a reproducer I can use to debug the code? Nothing fancy. It just try to remove and add back each memory section. #!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0 import os import re import subprocess def mem_iter(): base_dir = '/sys/devices/system/memory/' for curr_dir in os.listdir(base_dir): if re.match(r'memory\d+', curr_dir): yield base_dir + curr_dir if __name__ == '__main__': print('- Try to remove each memory section and then add it back.') for mem_dir in mem_iter(): status = f'{mem_dir}/online' if open(status).read().rstrip() == '1': # This could expectedly fail due to many reasons. section = os.path.basename(mem_dir) print(f'- Try to remove {section}.') proc = subprocess.run([f'echo 0 | sudo tee {status}'], shell=True) if proc.returncode == 0: print(f'- Try to add {section}.') subprocess.check_call([f'echo 1 | sudo tee {status}'], shell=True)