Message ID | 20220919024745.153395-1-shaoqin.huang@intel.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 53B26C32771 for <linux-mm@archiver.kernel.org>; Mon, 19 Sep 2022 02:49:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 82B44940007; Sun, 18 Sep 2022 22:49:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7DB4A6B0073; Sun, 18 Sep 2022 22:49:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6A223940007; Sun, 18 Sep 2022 22:49:11 -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 5B9D76B0072 for <linux-mm@kvack.org>; Sun, 18 Sep 2022 22:49:11 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2FDE81204AC for <linux-mm@kvack.org>; Mon, 19 Sep 2022 02:49:11 +0000 (UTC) X-FDA: 79927303302.20.93E36E8 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf31.hostedemail.com (Postfix) with ESMTP id 1D5B520006 for <linux-mm@kvack.org>; Mon, 19 Sep 2022 02:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663555750; x=1695091750; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TpLKzHcoPWVF/VzhAYmzp5p7rI6irdkZ0/MM0DfUOUY=; b=FuTBlhY+8/Hvu00iiYbfgMRivDr10W41tXzdPWDbk5IHKYpxUhKEbLRm ybu1wSQJyCsCKkuUVj855otanpjO0qMpue1NUBORppwaECrhzmVdFsssR ffLrMSrtse0uFzEipLEboNBFq9yOyDbgr8ESBGjTzUnW5gYBrvga8V8bs +t+4x+QpjVaBQMyeV3Ktd3tlosBS/ACyTsodHUr1zit8qiZIfTpBRgFKa afUa2vW686GkziPQ18hdK5yC6u3LCCXgq2vmsRpnqTx+XbeHDnPnqIlVG /a4SUu8oLBaqhpLgWzw1a0Kto8ptUS77es1sH84N6fjMKNd9jUqWWFwxw A==; X-IronPort-AV: E=McAfee;i="6500,9779,10474"; a="300111677" X-IronPort-AV: E=Sophos;i="5.93,325,1654585200"; d="scan'208";a="300111677" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2022 19:49:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,325,1654585200"; d="scan'208";a="947035156" Received: from q.bj.intel.com ([10.238.154.102]) by fmsmga005.fm.intel.com with ESMTP; 18 Sep 2022 19:49:05 -0700 From: shaoqin.huang@intel.com To: rppt@kernel.org Cc: Shaoqin Huang <shaoqin.huang@intel.com>, David Hildenbrand <david@redhat.com>, Karolina Drobnik <karolinadrobnik@gmail.com>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Rebecca Mckeever <remckee0@gmail.com> Subject: [PATCH v4 0/3] Add tests trying to memblock_add() or memblock_reserve() 129th region Date: Mon, 19 Sep 2022 10:47:36 +0800 Message-Id: <20220919024745.153395-1-shaoqin.huang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663555750; 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=zeoQBGV3pKUudBmtDVYVPoWN13DvC42SOlkrtb5LDtA=; b=PvX6NtG/2/sIh6T4/ABrn4Eb4LXhKeDfTlh7CKcLnhqnWEaLldq/pfsz7gxo1Jv2XzffZt uFkUFz9ulmBDNn4KCLN/8RTyHEegZSCAzCC5FXLgB4xeptsrQli8XWJi7ZzszuBNh9dqQc 32IbAvh/nnGOoR/Agb0FUVNm8672nyo= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=FuTBlhY+; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf31.hostedemail.com: domain of shaoqin.huang@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=shaoqin.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663555750; a=rsa-sha256; cv=none; b=fTMPOGsZuw+7LpxVtNwyW82MKBom3B99V5M79VAV5IKJeA0kNIQZniBRMhzhnisWGEGXA2 9rYHJL3OrUHSZaIwalvpiYHYXimn4idNKEqqZLKElUnFda+YalZ5S6xiWGYiZhiK3eeK2F nZm3WTD3n3fi+Jw+9+LIma+D6lq2fKs= X-Stat-Signature: g6weyci9zdysrppc55sxoj1qmwbxn63g X-Rspamd-Queue-Id: 1D5B520006 Authentication-Results: imf31.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=FuTBlhY+; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf31.hostedemail.com: domain of shaoqin.huang@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=shaoqin.huang@intel.com X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1663555749-828929 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: <linux-mm.kvack.org> |
Series |
Add tests trying to memblock_add() or memblock_reserve() 129th region
|
expand
|
From: Shaoqin Huang <shaoqin.huang@intel.com> 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. Changelog: ---------- v4: - Increase the MEM_SIZE to SZ_32K. And makes the calculation process in memblock_add_many_check() more simpler. v3: - Avoid to allocated multiple memory region from dummy_physical_memory_base(), split the memory into different part instead. - Some comments improvement. v2: - Modify the get_memory_block_base() to dummy_physical_memory_base(). - memory_add() the memory which is allocated from dummy_physical_memory_init() instead of some faked memory. - Add more comments to illustrate the test process. - Add a function dummy_physical_memory_cleanup_many() to free multiple memory which is allocated from dummy_physical_memory_init(). 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 | 184 +++++++++++++++++++++++ tools/testing/memblock/tests/common.c | 7 +- tools/testing/memblock/tests/common.h | 6 +- 4 files changed, 196 insertions(+), 12 deletions(-)