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 B10E4D64097 for ; Fri, 8 Nov 2024 22:13:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2F2F96B00C2; Fri, 8 Nov 2024 17:13:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 27AE16B00D2; Fri, 8 Nov 2024 17:13:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CDE16B00D3; Fri, 8 Nov 2024 17:13:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id DD48B6B00C2 for ; Fri, 8 Nov 2024 17:13:29 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 848AF140ECA for ; Fri, 8 Nov 2024 22:13:29 +0000 (UTC) X-FDA: 82764329718.02.DB20CF2 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by imf13.hostedemail.com (Postfix) with ESMTP id CB1A42001C for ; Fri, 8 Nov 2024 22:12:48 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=R7z6Am7c; spf=pass (imf13.hostedemail.com: domain of lkp@intel.com designates 198.175.65.16 as permitted sender) smtp.mailfrom=lkp@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=1731103838; 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=KwTc5nk+OEETBLbG+DVHJx4a/Edy8zOq1VP564HW3sc=; b=k8kJelmjBrmZvAVENA0NFnjzUUsZcFbXgzPKqt1ysKWeSxdSXzZ6/K7zUq6vm1c5v3yWAJ 7SdVy+51OYd/lgqI5MaWAjiwB4yA9ROByyod6pjIdkO3Z9cbo0Tb4lF8Ah6eyptsQ6YKYn keJQjXnbk940J1XbCBvRg5rxUVDyKRI= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=R7z6Am7c; spf=pass (imf13.hostedemail.com: domain of lkp@intel.com designates 198.175.65.16 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731103838; a=rsa-sha256; cv=none; b=dOAEBrtc2JMo8Ju8XQrfL2vZAjszs86YV1s+//ivIezZDdlRflidObuaqLJeeOgHwgbEDh /ZwOVBEfIk5wmqhp7ctpXRAmkTS9/qy5fndAWzhM4xcNo2QvXAoXCqqoMctMWhn3kMToRN BYxKcC69YpXtC08n3f7PNvWu8kt+KuA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731104007; x=1762640007; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=oDUo9ZINLG96hfXKTnEvhEElrOjkQNRAzFXoy2hRnfE=; b=R7z6Am7cIly39ibAFCRCpT5ZjqunZki8UnRI2U6iFmcC/Pldh5Xzv4oa yb5mICTCxgAQuuw8pJYaJ1PLYSNVpkpZYigiwLod3RaZb0j/tl0c8LG2w dJia3jBt0ZFwEFWZBrXu962nzwrIKXlYnTdM8bGsS4hBR3e2LJenQGW2g 3G+/VR/6311JrXr4MKRsPNp8Qox5blFR7NvWvj1wVFOk/JlicnQlP6crL 7mUAfbot7jU55I6PkeDvL2Tvf9jQEEKuhstpcSaVMjWkFL2CGB0H5D/CS EEyn7nOmT9AuSr0Kg7ecD3ViwRgT4aw1UGHC3rp6Ur6x8bS1t/NEerF7e w==; X-CSE-ConnectionGUID: /S2nDkU+TtOSZmjE4I09zA== X-CSE-MsgGUID: ZowilhBZQdeaCCCvCVMvSQ== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="31158416" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="31158416" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2024 14:13:25 -0800 X-CSE-ConnectionGUID: j/bZt1yMR4CE0hvnkDG8JQ== X-CSE-MsgGUID: mm06E790Sm6rmPr89IO8jQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="90590000" Received: from lkp-server01.sh.intel.com (HELO a48cf1aa22e8) ([10.239.97.150]) by orviesa003.jf.intel.com with ESMTP; 08 Nov 2024 14:13:22 -0800 Received: from kbuild by a48cf1aa22e8 with local (Exim 4.96) (envelope-from ) id 1t9XEE-000rpw-2N; Fri, 08 Nov 2024 22:13:18 +0000 Date: Sat, 9 Nov 2024 06:12:19 +0800 From: kernel test robot To: Adrian Huang , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Andrew Morton Cc: llvm@lists.linux.dev, 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: <202411090614.hOVFwh3l-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-Rspamd-Server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ebb6VcJY wogQqdds/mMvk0blvE2/34j1NBblOlaB0raw6ljdfcCjz9uAmMeBVm2heRnqkB3MV7zKdidDR6f09IuwUL7lRvHTt31/WlvK8JWVM4wsFgqFkZDjo0QzCkNUkkp89RWXcMruO78sGhM38Bsf8Bt2ga21gsi3XB1fgec4t2BgrxYl5AE2490Xe7YRwPO1wlPd9cQsimCpvhtwXLsFO8tZqbVHxbRK/KhfE+iFXhfRCo+SANURTBUKcxc8DXjryTXVco3R6r8cVTaOiOeaBoATM0jyvrWem8PNgzkTgyT//sAgVUjeNcfg2T+RWQHgnM9tWlzN02u2hinkKV7bDdF7fxTvdOT4M+YQSjv8QGTiTvnvQ04TDc57gX4FFnqa1e1npHuN4H5vlB1BZMWgBgTWfanSYRz5401qRiq5E+eGuzedMjHg= 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: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241109/202411090614.hOVFwh3l-lkp@intel.com/config) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241109/202411090614.hOVFwh3l-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/202411090614.hOVFwh3l-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/damon/vaddr.c:10: In file included from include/linux/highmem.h:8: In file included from include/linux/cacheflush.h:5: In file included from arch/x86/include/asm/cacheflush.h:5: In file included from include/linux/mm.h:2212: include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 504 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 505 | item]; | ~~~~ include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 511 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 512 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 524 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 525 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/damon/vaddr.c:736: >> mm/damon/tests/vaddr-kunit.h:66:13: warning: stack frame size (2248) exceeds limit (2048) in 'damon_test_three_regions_in_vmas' [-Wframe-larger-than] 66 | static void damon_test_three_regions_in_vmas(struct kunit *test) | ^ 5 warnings generated. vim +/damon_test_three_regions_in_vmas +66 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