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 6E013D64089 for ; Fri, 8 Nov 2024 20:51:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA0CD6B00B5; Fri, 8 Nov 2024 15:51:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C036A6B00B6; Fri, 8 Nov 2024 15:51:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA2D36B00B7; Fri, 8 Nov 2024 15:51:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 8CE646B00B5 for ; Fri, 8 Nov 2024 15:51:27 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3B8A0160FC9 for ; Fri, 8 Nov 2024 20:51:27 +0000 (UTC) X-FDA: 82764120852.20.7B5155D Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by imf29.hostedemail.com (Postfix) with ESMTP id 3E90312001E for ; Fri, 8 Nov 2024 20:50:33 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="nF3+/G09"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf29.hostedemail.com: domain of lkp@intel.com designates 192.198.163.15 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731099000; 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:dkim-signature; bh=Ysc5XegQeRFRGVT9e6WA3C0/6CDKshd2CULwZ/QqpXE=; b=3GYv4Vaj7t8md/QfyN/d2KZ/a/GE68YwlDFTNoJYmTo3Jwvt4hSrdaXtNGSp9cq/rNNsQW 75GWV8Zu5S4iWHUYTNP44IKkadPOJWAhr4qCg2q5LhjJYr8AJ1EzXBIiN6AHdDFlhihfmy rdUBIfzchN1kYSztldx8qx5tnkhVRSQ= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="nF3+/G09"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf29.hostedemail.com: domain of lkp@intel.com designates 192.198.163.15 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731099000; a=rsa-sha256; cv=none; b=vdO16AccdlSIEwB4buP6/Hct6yox5zs0Y9N1a1N5xG6A4lvlOzNwp4y/7nstjoQHBDU8tF bfOZ/lt8lCuuCkmpBzMu7LV2WG49BfqwdFR3lAJGEeyf6Ro9QgrBbVmbyn//7oRntNwqyc mkP102/uk107DZmjYZTpqVyB7UrXihY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731099085; x=1762635085; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=dOVIx5TcyX42BPBZj2a+etO5eUjZ45VMOao/Q70JuWw=; b=nF3+/G09d79yATT++VW2GKWu2pJd+KitqFrO3qKE3/BEpOzNBM5kJWXv ejiQdD1ZXDXIRdgoCFbgFgz38nKDEjaCoNcyMD2o1MBvzFkxv1RxGlEm2 Zv0jZVlvvNibBE5FxEDNKLFdPjez/ndLTqiELTvut7OEFVZJQEDhoBdkV XykYiFUMk4lBZ6FtbEh9b+iAeMJI1Tj9awNyoRwkwvp+7gomy8NQ6HKmd ykF2zUSGkuRApvST0rDjMrd9bCLl1PDK5L8mjBm9SAYDNM9tpeEWu3EHK O2CyrSbBUvkzDnmOybrFfZz8XWYza+UCRbEGNiVahWJXBwL7bDHsX9aWW g==; X-CSE-ConnectionGUID: +x+8Xe2VSiyhBrYelyNlJw== X-CSE-MsgGUID: Z8NdyG/ZTEeINq5vKiiP7w== X-IronPort-AV: E=McAfee;i="6700,10204,11250"; a="31097601" X-IronPort-AV: E=Sophos;i="6.12,139,1728975600"; d="scan'208";a="31097601" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2024 12:51:22 -0800 X-CSE-ConnectionGUID: jpUrmjM4QDmg7pGLtvzH+Q== X-CSE-MsgGUID: FMqk57uaRay2ZoFslIfbCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,139,1728975600"; d="scan'208";a="85636572" Received: from lkp-server01.sh.intel.com (HELO a48cf1aa22e8) ([10.239.97.150]) by orviesa009.jf.intel.com with ESMTP; 08 Nov 2024 12:51:18 -0800 Received: from kbuild by a48cf1aa22e8 with local (Exim 4.96) (envelope-from ) id 1t9Vwq-000rnO-14; Fri, 08 Nov 2024 20:51:16 +0000 Date: Sat, 9 Nov 2024 04:50:27 +0800 From: kernel test robot To: Adrian Huang , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Andrew Morton Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Raghavendra K T , linux-kernel@vger.kernel.org, Adrian Huang , Jiwei Sun Subject: Re: [PATCH 1/1] sched/numa: Fix memory leak due to the overwritten vma->numab_state Message-ID: <202411090453.EFAEFpnv-lkp@intel.com> References: <20241108133139.25326-1-ahuang12@lenovo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241108133139.25326-1-ahuang12@lenovo.com> X-Rspam-User: X-Rspamd-Server: r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B0b29f+OH+mL4jauRj6Z+knuZ/q3D1n8dXEP+fiFza7oafKCtmOWS2udj9OtKvr4mZVzajy+TS8p0ygTqaTVGJCwlzrP6jKZQ0JZJngVxoGe5GEZpBtBEMqAeDyjOGlkMz551y2AqsloSzJPwxw/TzUXy7qm2rHgngFGmvbV5bekuKY6/LZl4dvfNhhql44jdPDYTKY/lLbKgSdXFVP/389qUZlccGiCVvK19Lr0weOO+mHs4sdbyUpZd85skI8kAAKOBhsdvUiglRxqAzhn17iAflOhssph+9Fu7/UKt4EDMkVMoGKbtVmcyQGb3L4mFxyPjcLOrlcagOMQFCd2EszX4G7ODVwBh7Ebmashn75NMzCljO+Vg34ZGFVHJlgH+GbkPUrC+DxRE8ZtkJDJl0LIN8HbooINt4WzaHuLgc= 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: List-Subscribe: List-Unsubscribe: Hi Adrian, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on tip/master tip/sched/core peterz-queue/sched/core linus/master v6.12-rc6 next-20241108] [cannot apply to tip/auto-latest] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Adrian-Huang/sched-numa-Fix-memory-leak-due-to-the-overwritten-vma-numab_state/20241108-213420 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20241108133139.25326-1-ahuang12%40lenovo.com patch subject: [PATCH 1/1] sched/numa: Fix memory leak due to the overwritten vma->numab_state config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20241109/202411090453.EFAEFpnv-lkp@intel.com/config) compiler: s390-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241109/202411090453.EFAEFpnv-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202411090453.EFAEFpnv-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/damon/vaddr.c:736: mm/damon/tests/vaddr-kunit.h: In function 'damon_test_three_regions_in_vmas': >> mm/damon/tests/vaddr-kunit.h:92:1: warning: the frame size of 2168 bytes is larger than 2048 bytes [-Wframe-larger-than=] 92 | } | ^ vim +92 mm/damon/tests/vaddr-kunit.h 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 38 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 39 /* 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 40 * Test __damon_va_three_regions() function 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 41 * 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 42 * In case of virtual memory address spaces monitoring, DAMON converts the 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 43 * complex and dynamic memory mappings of each target task to three 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 44 * discontiguous regions which cover every mapped areas. However, the three 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 45 * regions should not include the two biggest unmapped areas in the original 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 46 * mapping, because the two biggest areas are normally the areas between 1) 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 47 * heap and the mmap()-ed regions, and 2) the mmap()-ed regions and stack. 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 48 * Because these two unmapped areas are very huge but obviously never accessed, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 49 * covering the region is just a waste. 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 50 * 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 51 * '__damon_va_three_regions() receives an address space of a process. It 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 52 * first identifies the start of mappings, end of mappings, and the two biggest 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 53 * unmapped areas. After that, based on the information, it constructs the 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 54 * three regions and returns. For more detail, refer to the comment of 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 55 * 'damon_init_regions_of()' function definition in 'mm/damon.c' file. 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 56 * 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 57 * For example, suppose virtual address ranges of 10-20, 20-25, 200-210, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 58 * 210-220, 300-305, and 307-330 (Other comments represent this mappings in 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 59 * more short form: 10-20-25, 200-210-220, 300-305, 307-330) of a process are 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 60 * mapped. To cover every mappings, the three regions should start with 10, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 61 * and end with 305. The process also has three unmapped areas, 25-200, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 62 * 220-300, and 305-307. Among those, 25-200 and 220-300 are the biggest two 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 63 * unmapped areas, and thus it should be converted to three regions of 10-25, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 64 * 200-220, and 300-330. 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 65 */ 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 66 static void damon_test_three_regions_in_vmas(struct kunit *test) 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 67 { d0cf3dd47f0d5d mm/damon/vaddr-test.h Liam R. Howlett 2022-09-06 68 static struct mm_struct mm; ba7196e566516f mm/damon/tests/vaddr-kunit.h Leo Stone 2024-09-22 69 struct damon_addr_range regions[3] = {0}; 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 70 /* 10-20-25, 200-210-220, 300-305, 307-330 */ 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 71 struct vm_area_struct vmas[] = { 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 72 (struct vm_area_struct) {.vm_start = 10, .vm_end = 20}, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 73 (struct vm_area_struct) {.vm_start = 20, .vm_end = 25}, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 74 (struct vm_area_struct) {.vm_start = 200, .vm_end = 210}, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 75 (struct vm_area_struct) {.vm_start = 210, .vm_end = 220}, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 76 (struct vm_area_struct) {.vm_start = 300, .vm_end = 305}, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 77 (struct vm_area_struct) {.vm_start = 307, .vm_end = 330}, 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 78 }; 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 79 f0679f9e6d88ae mm/damon/tests/vaddr-kunit.h SeongJae Park 2024-09-04 80 mt_init_flags(&mm.mm_mt, MT_FLAGS_ALLOC_RANGE | MT_FLAGS_USE_RCU); 34403fa579514a mm/damon/vaddr-test.h Liam R. Howlett 2023-01-20 81 if (__link_vmas(&mm.mm_mt, vmas, ARRAY_SIZE(vmas))) 34403fa579514a mm/damon/vaddr-test.h Liam R. Howlett 2023-01-20 82 kunit_skip(test, "Failed to create VMA tree"); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 83 d0cf3dd47f0d5d mm/damon/vaddr-test.h Liam R. Howlett 2022-09-06 84 __damon_va_three_regions(&mm, regions); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 85 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 86 KUNIT_EXPECT_EQ(test, 10ul, regions[0].start); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 87 KUNIT_EXPECT_EQ(test, 25ul, regions[0].end); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 88 KUNIT_EXPECT_EQ(test, 200ul, regions[1].start); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 89 KUNIT_EXPECT_EQ(test, 220ul, regions[1].end); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 90 KUNIT_EXPECT_EQ(test, 300ul, regions[2].start); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 91 KUNIT_EXPECT_EQ(test, 330ul, regions[2].end); 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 @92 } 17ccae8bb5c928 mm/damon/vaddr-test.h SeongJae Park 2021-09-07 93 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki