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 C923CE7717D for ; Wed, 11 Dec 2024 10:11:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 642F36B0118; Wed, 11 Dec 2024 05:11:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5CBAA6B0134; Wed, 11 Dec 2024 05:11:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 420736B0178; Wed, 11 Dec 2024 05:11:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1F6FD6B0118 for ; Wed, 11 Dec 2024 05:11:49 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id BB3B2AEAAD for ; Wed, 11 Dec 2024 10:11:48 +0000 (UTC) X-FDA: 82882261476.16.9EC6458 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by imf14.hostedemail.com (Postfix) with ESMTP id AF4F8100016 for ; Wed, 11 Dec 2024 10:11:20 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=SdtpFohp; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 198.175.65.20 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733911885; a=rsa-sha256; cv=none; b=JoP9NOUOH2JqSmWIs7oB6IZJLoSvN5vlh/i8zStdxgDHenW66JE4a5qbWloG929wyXlKhX j9zGQF+kL5O90WYeVX95IWhPbn25dK3229FyKGtvSVxYrNRr3pvzANXlb1rJkNek01yPWx b8MCoj98DLLl9m2GzR0aFFUk7QsdQBY= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=SdtpFohp; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf14.hostedemail.com: domain of lkp@intel.com designates 198.175.65.20 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=1733911885; 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=k7OH6m8Cu+wje10egsV7seCu6H835zkkchTpxJkEIkM=; b=Gz7SEIY+0UpL2fRBRwaLnJgRSLR/EC1fME4FfNoTBSB+QZPOqLc7Q9BpxKqWyUKHzv8TRz 6ObGddryIdLr4WBm8ZubHkER8itoK5U4c7rxWbs3jrErsZFeZCuzqk30/kty10rHvRDLbv hLyWeCOeUpgSkhyb+XCzmka2W3gFU5A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733911907; x=1765447907; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=tGwE365nj1d7bmLvCqz8mxqdyk12syQR16BTjMYprpg=; b=SdtpFohphzIs4+9blcZRt5nMbzs+8LNPT4KHcjLR/eEqpEdALlWedpw8 oEryK1senVBjUODyaZQblaPtBJ0vktdUD9i9JpM3oieb+zc9qObt+QX1b BxqYKqEqRs83Wk8jEFABAAyd0lsBYKMjjxm7lBUFl6bstm4edrwTAwnB2 mn7PqkSkDq7oArRTX7nXiYyRg2dkwonC7/rGs0yO79AEPOJccRYux5ns0 9ru4str2TNCcHNs3ujQg3VaeFAJU5w36LmuPjG8JWlBoNlRTxtI5vxtv+ d55A5YaAI8SQ+tBcX4XrfpfS3Da9zsXq8+Z1UzeUjjDrggRDnPDlW6s0h w==; X-CSE-ConnectionGUID: RtwU7XVMTZup9XH4sGZipw== X-CSE-MsgGUID: ZjJhlsEtTl6wWXhcB8/fgw== X-IronPort-AV: E=McAfee;i="6700,10204,11282"; a="34016599" X-IronPort-AV: E=Sophos;i="6.12,225,1728975600"; d="scan'208";a="34016599" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2024 02:11:45 -0800 X-CSE-ConnectionGUID: N5KSQ7dBS/m9MGGu6Z2PWw== X-CSE-MsgGUID: Ulot6HeBQAei+KlKGMZ0BA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,225,1728975600"; d="scan'208";a="126584011" Received: from lkp-server01.sh.intel.com (HELO 82a3f569d0cb) ([10.239.97.150]) by orviesa002.jf.intel.com with ESMTP; 11 Dec 2024 02:11:42 -0800 Received: from kbuild by 82a3f569d0cb with local (Exim 4.96) (envelope-from ) id 1tLJgw-0006X3-2Q; Wed, 11 Dec 2024 10:11:38 +0000 Date: Wed, 11 Dec 2024 18:11:06 +0800 From: kernel test robot To: "Matthew Wilcox (Oracle)" , Andrew Morton Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , "Matthew Wilcox (Oracle)" , Christoph Hellwig , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , cgroups@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] vmalloc: Move memcg logic into memcg code Message-ID: <202412111725.koF7jNeD-lkp@intel.com> References: <20241210193035.2667005-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241210193035.2667005-1-willy@infradead.org> X-Stat-Signature: i13rdmzhttsyeykn1iptwiepmehq4t8j X-Rspam-User: X-Rspamd-Queue-Id: AF4F8100016 X-Rspamd-Server: rspam08 X-H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SmVW83Ev0zaJMp2CKcKp2vGlXQ9lJoWXHLneom0O21dXFYmVsXvXA67flLDyuA5uCKuoruvd1bGtWAdSoHvzOf6phQzQbeuHNCXYlBGeUJz14QS0QC6pQPMC8KfRjAHlhD78TWLfLWn8tR2hdTjjtes3WZgBXnTLEkDxLnS9RgWwPcAqxlzm5d5Rgk+B2c2WEI956gLa9++FhapViATGWH3CR91ZjeJhi6DodieWoWU4c1GSqutVqgm42VxHGY/rGW5FBFnf9/Ke3tV4cO3GAIJ318s9SHcHF4PlOlGDxllMRgEZZz/yiMl44OKwUjWYBuSve3J9aamR0HtHDHtcd8CqIJjJbPN6DA+ad 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 Matthew, kernel test robot noticed the following build warnings: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on linus/master v6.13-rc2 next-20241211] [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/Matthew-Wilcox-Oracle/vmalloc-Move-memcg-logic-into-memcg-code/20241211-033214 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20241210193035.2667005-1-willy%40infradead.org patch subject: [PATCH] vmalloc: Move memcg logic into memcg code config: m68k-randconfig-r112-20241211 (https://download.01.org/0day-ci/archive/20241211/202412111725.koF7jNeD-lkp@intel.com/config) compiler: m68k-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20241211/202412111725.koF7jNeD-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/202412111725.koF7jNeD-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> mm/vmalloc.c:3675:55: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int nr_pages @@ got restricted gfp_t [assigned] [usertype] gfp_mask @@ mm/vmalloc.c:3675:55: sparse: expected unsigned int nr_pages mm/vmalloc.c:3675:55: sparse: got restricted gfp_t [assigned] [usertype] gfp_mask >> mm/vmalloc.c:3675:69: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted gfp_t [usertype] gfp @@ got unsigned int nr_pages @@ mm/vmalloc.c:3675:69: sparse: expected restricted gfp_t [usertype] gfp mm/vmalloc.c:3675:69: sparse: got unsigned int nr_pages mm/vmalloc.c:180:74: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:231:74: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:282:74: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:384:46: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:407:46: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:427:46: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:531:46: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:549:46: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:567:46: sparse: sparse: self-comparison always evaluates to false mm/vmalloc.c:1054:25: sparse: sparse: context imbalance in 'find_vmap_area_exceed_addr_lock' - wrong count at exit mm/vmalloc.c:4426:28: sparse: sparse: context imbalance in 'vread_iter' - unexpected unlock vim +3675 mm/vmalloc.c 3623 3624 static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, 3625 pgprot_t prot, unsigned int page_shift, 3626 int node) 3627 { 3628 const gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO; 3629 bool nofail = gfp_mask & __GFP_NOFAIL; 3630 unsigned long addr = (unsigned long)area->addr; 3631 unsigned long size = get_vm_area_size(area); 3632 unsigned long array_size; 3633 unsigned int nr_small_pages = size >> PAGE_SHIFT; 3634 unsigned int page_order; 3635 unsigned int flags; 3636 int ret; 3637 3638 array_size = (unsigned long)nr_small_pages * sizeof(struct page *); 3639 3640 if (!(gfp_mask & (GFP_DMA | GFP_DMA32))) 3641 gfp_mask |= __GFP_HIGHMEM; 3642 3643 /* Please note that the recursion is strictly bounded. */ 3644 if (array_size > PAGE_SIZE) { 3645 area->pages = __vmalloc_node_noprof(array_size, 1, nested_gfp, node, 3646 area->caller); 3647 } else { 3648 area->pages = kmalloc_node_noprof(array_size, nested_gfp, node); 3649 } 3650 3651 if (!area->pages) { 3652 warn_alloc(gfp_mask, NULL, 3653 "vmalloc error: size %lu, failed to allocated page array size %lu", 3654 nr_small_pages * PAGE_SIZE, array_size); 3655 free_vm_area(area); 3656 return NULL; 3657 } 3658 3659 set_vm_area_page_order(area, page_shift - PAGE_SHIFT); 3660 page_order = vm_area_page_order(area); 3661 3662 /* 3663 * High-order nofail allocations are really expensive and 3664 * potentially dangerous (pre-mature OOM, disruptive reclaim 3665 * and compaction etc. 3666 * 3667 * Please note, the __vmalloc_node_range_noprof() falls-back 3668 * to order-0 pages if high-order attempt is unsuccessful. 3669 */ 3670 area->nr_pages = vm_area_alloc_pages((page_order ? 3671 gfp_mask & ~__GFP_NOFAIL : gfp_mask) | __GFP_NOWARN, 3672 node, page_order, nr_small_pages, area->pages); 3673 3674 atomic_long_add(area->nr_pages, &nr_vmalloc_pages); > 3675 ret = obj_cgroup_charge_vmalloc(&area->objcg, gfp_mask, area->nr_pages); 3676 if (ret) 3677 goto fail; 3678 3679 /* 3680 * If not enough pages were obtained to accomplish an 3681 * allocation request, free them via vfree() if any. 3682 */ 3683 if (area->nr_pages != nr_small_pages) { 3684 /* 3685 * vm_area_alloc_pages() can fail due to insufficient memory but 3686 * also:- 3687 * 3688 * - a pending fatal signal 3689 * - insufficient huge page-order pages 3690 * 3691 * Since we always retry allocations at order-0 in the huge page 3692 * case a warning for either is spurious. 3693 */ 3694 if (!fatal_signal_pending(current) && page_order == 0) 3695 warn_alloc(gfp_mask, NULL, 3696 "vmalloc error: size %lu, failed to allocate pages", 3697 area->nr_pages * PAGE_SIZE); 3698 goto fail; 3699 } 3700 3701 /* 3702 * page tables allocations ignore external gfp mask, enforce it 3703 * by the scope API 3704 */ 3705 if ((gfp_mask & (__GFP_FS | __GFP_IO)) == __GFP_IO) 3706 flags = memalloc_nofs_save(); 3707 else if ((gfp_mask & (__GFP_FS | __GFP_IO)) == 0) 3708 flags = memalloc_noio_save(); 3709 3710 do { 3711 ret = vmap_pages_range(addr, addr + size, prot, area->pages, 3712 page_shift); 3713 if (nofail && (ret < 0)) 3714 schedule_timeout_uninterruptible(1); 3715 } while (nofail && (ret < 0)); 3716 3717 if ((gfp_mask & (__GFP_FS | __GFP_IO)) == __GFP_IO) 3718 memalloc_nofs_restore(flags); 3719 else if ((gfp_mask & (__GFP_FS | __GFP_IO)) == 0) 3720 memalloc_noio_restore(flags); 3721 3722 if (ret < 0) { 3723 warn_alloc(gfp_mask, NULL, 3724 "vmalloc error: size %lu, failed to map pages", 3725 area->nr_pages * PAGE_SIZE); 3726 goto fail; 3727 } 3728 3729 return area->addr; 3730 3731 fail: 3732 vfree(area->addr); 3733 return NULL; 3734 } 3735 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki