From patchwork Mon Aug 22 02:33:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Shaoqin" X-Patchwork-Id: 12950142 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 ADC0EC00140 for ; Mon, 22 Aug 2022 02:37:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC7DE940007; Sun, 21 Aug 2022 22:37:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D762E6B0074; Sun, 21 Aug 2022 22:37:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C3E23940007; Sun, 21 Aug 2022 22:37:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B2C946B0073 for ; Sun, 21 Aug 2022 22:37:35 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8236D1604DC for ; Mon, 22 Aug 2022 02:37:35 +0000 (UTC) X-FDA: 79825667670.24.0D5321A Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf29.hostedemail.com (Postfix) with ESMTP id 9D07012011B for ; Mon, 22 Aug 2022 02:34:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661135650; x=1692671650; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TJaa7NPIQMMfRVxnqj/u/WhocpvUjB4OFaLsFLxwmS0=; b=nIZgprE/TrL+P4Vqw0f1jnWHR/3oHDacMhL5bKUMx0zf1VVKtYaMF6Yg yTTliV4ywQAR4FajmsJ6uBfGhmKKrMGg+fGGillRavSvZ9m49M+0C8VMq 0KeSjSXWxmvsov8ddVY1Hivse5LIgeimdt153Qj1W9Ot2ST7S4wuAxfZY 3vjiMVGoPNl7ljW9PKrWs6+S/mLJI+/28KhCsiyjKwLPIXDi4eErvXh83 bSymqtpHXEXe7Jj84Ul2b5iZNQp4xS4xeqiBysN5ZYEiszCWJW9nvmpTn HBLh+mPzAxvL/kOQ8e8VkXaOJzs0FL7X9v/q3Zadf3xsDl/pIDiAnEWyO g==; X-IronPort-AV: E=McAfee;i="6500,9779,10446"; a="379598300" X-IronPort-AV: E=Sophos;i="5.93,254,1654585200"; d="scan'208";a="379598300" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2022 19:34:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,254,1654585200"; d="scan'208";a="936850985" Received: from q.bj.intel.com ([10.238.154.102]) by fmsmga005.fm.intel.com with ESMTP; 21 Aug 2022 19:34:04 -0700 From: shaoqin.huang@intel.com To: rppt@kernel.org Cc: Shaoqin Huang , Karolina Drobnik , Rebecca Mckeever , David Hildenbrand , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] Add tests trying to memblock_add() or memblock_reserve() 129th region Date: Mon, 22 Aug 2022 10:33:25 +0800 Message-Id: <20220822023332.127633-1-shaoqin.huang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661135650; a=rsa-sha256; cv=none; b=hIQGZcApxetIMdi8GU7aKVPrnxOJhlGYYSP3zh0Z9ZudaoYeF4vtoCppFVHfDzI/9g3CEU NyTyBqfq0YZp4Jjs2RAmoQ04YkLOvm1SNSfhU0cROddYWREkJgLvekzsM0P3hajGqCdbZB pQbS80gL27hWQ0eywoNfEYjTVqJKzzI= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b="nIZgprE/"; spf=pass (imf29.hostedemail.com: domain of shaoqin.huang@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=shaoqin.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661135650; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=2qFSA0N9L4DuPjzms7+V5JLcc3XhYT2h9aLawYQED3Y=; b=Lo0O0pGZ11WMRdRAis3+zEZlsTmWXoT0lJcezoh4xBwurQky4yCDoI+E04hDX6tPS4NLxy 2eUPGfF3/1yz+zD1mffnrnOW9b0iZxttES2EOWrmZcl8sBZ4MEJPAkvjEnIwkrVQ4+Smfc qNDquqjshq5k9QPSEzyT9mPR/a5mlB8= X-Stat-Signature: i5qcrffa935qmm9bf5ha5qq9p4u8a663 X-Rspamd-Queue-Id: 9D07012011B Authentication-Results: imf29.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b="nIZgprE/"; spf=pass (imf29.hostedemail.com: domain of shaoqin.huang@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=shaoqin.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1661135650-62882 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000471, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Shaoqin Huang These tests is aimed for testing the memblock_double_array() can work normal. It will using the dummy_physical_memory_init() to add the valid memory region into the memblock.memory, and this memory region will be choosed when memblock_double_array() to allocate the new memory region to double the regions. Thus the new memory.regions or reserved.regions will occupy the valid memory region, and the memory.max and reserved.max also being doubled. Check all of these changed stuff, to make sure it actually success. Shaoqin Huang (3): memblock test: Add test to memblock_add() 129th region memblock test: Add test to memblock_reserve() 129th region memblock test: Update TODO list tools/testing/memblock/TODO | 11 +- tools/testing/memblock/tests/basic_api.c | 169 +++++++++++++++++++++++ tools/testing/memblock/tests/common.c | 7 +- tools/testing/memblock/tests/common.h | 3 + 4 files changed, 179 insertions(+), 11 deletions(-)