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 E31ECE67802 for ; Sat, 2 Nov 2024 15:39:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDE3A6B007B; Sat, 2 Nov 2024 11:39:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D8DAE6B0082; Sat, 2 Nov 2024 11:39:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C54E96B0083; Sat, 2 Nov 2024 11:39:51 -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 A97F86B007B for ; Sat, 2 Nov 2024 11:39:51 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 58881AD564 for ; Sat, 2 Nov 2024 15:39:51 +0000 (UTC) X-FDA: 82741564500.22.324B896 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by imf28.hostedemail.com (Postfix) with ESMTP id 590C9C000B for ; Sat, 2 Nov 2024 15:39:18 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aNycTLmo; spf=pass (imf28.hostedemail.com: domain of lkp@intel.com designates 192.198.163.17 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=1730561827; 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=dgn3W1FkmwmGaZIDiEimxLNUa5ubnmib0JVm8kNnBcw=; b=UUEMedPZO4aGUog5wZhW1O0YJdWQah4A4GwniMRqUpRdWw0LwP08qUFJ8bUQTUyVkWjz4b BlovHbgaC2vu3ZvbvaG5ARWh39e2deKCi6iTdsNoPeae1I3JI59fCqu3RvmClDeE31aYl+ I50lnFF6ty6EGKl+n87rY/2DhnmXUxA= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=aNycTLmo; spf=pass (imf28.hostedemail.com: domain of lkp@intel.com designates 192.198.163.17 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=1730561827; a=rsa-sha256; cv=none; b=U6g3AIr6bDv4YM/W9Di9eHWt2/EcHoEJD2qBNo26ZC1bledo4LVQncJDBX9JGHXn8YcSa3 nbna0ZNWXsn95u3H+yeolFyG8VYfPmThMYX3mFLZMFmHZZh2UvdIaQ/EKaueHlaNuOyf5u yYIoOyMKzDUwg/A/D1Gxqw3vuziZOSo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730561988; x=1762097988; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6xdnxqTTRU/Hew1YfnBAtA+49Z2PkSSXvr/YM2PbjL8=; b=aNycTLmog1pM2Tu698aqxsHDJJ4kj1S+FiSe7A7jJfxp/DBSVk60rtxw 6yYbMScQdQc6mn/DvV4WbxlxygWQCLXvw7Prz880sb0BgI25DyccXEJS4 F53VrBKhQsK+hoWrhpJ+TM2K9xL3qbanRmrfH9wOs//dKJu4EVm2G97jt sRuaWTPzMlN2EEsELTKgDgGi/Q/9CgBdYy5U0+0ylKokhWMdJkGw7N5ny Co++WXeHZSWv/oe9lX4JZo/6Kk0XPuR70QIB9tgxrscewlhHF5OpLdHkr 6pNC2cqfz3F6r63bWwavWJLby3X+LupNRAxAJgWhSFvCe5zqT4rNLp9lM Q==; X-CSE-ConnectionGUID: /xAiHYJ3RyuoaA9V+bSI2w== X-CSE-MsgGUID: 5c1Z58GyTfWVSbsouCBMyA== X-IronPort-AV: E=McAfee;i="6700,10204,11244"; a="30188262" X-IronPort-AV: E=Sophos;i="6.11,253,1725346800"; d="scan'208";a="30188262" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2024 08:39:46 -0700 X-CSE-ConnectionGUID: F9HMnr+FTreWyvojn1ZRcg== X-CSE-MsgGUID: g3cMNDXsSQKT8RHorv8cMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,253,1725346800"; d="scan'208";a="84058110" Received: from lkp-server01.sh.intel.com (HELO a48cf1aa22e8) ([10.239.97.150]) by orviesa008.jf.intel.com with ESMTP; 02 Nov 2024 08:39:43 -0700 Received: from kbuild by a48cf1aa22e8 with local (Exim 4.96) (envelope-from ) id 1t7GE0-000j7l-0l; Sat, 02 Nov 2024 15:39:40 +0000 Date: Sat, 2 Nov 2024 23:39:03 +0800 From: kernel test robot To: Zi Yan , linux-mm@kvack.org, "Kirill A . Shutemov" , "Matthew Wilcox (Oracle)" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Ryan Roberts , Hugh Dickins , David Hildenbrand , Yang Shi , Miaohe Lin , Kefeng Wang , Yu Zhao , John Hubbard , linux-kernel@vger.kernel.org, Zi Yan Subject: Re: [PATCH v2 6/6] mm/truncate: use folio_split() for truncate operation. Message-ID: <202411022321.XN6rYrgx-lkp@intel.com> References: <20241101150357.1752726-7-ziy@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241101150357.1752726-7-ziy@nvidia.com> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 590C9C000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YOdNMHfJLBXnbufWxwu/uxKzH2vGpfSInCf0gGKm8r53gy1zKgo76tIrf9yalen7KDdJRBxbCzFxOo4XHTyoOJEPimh0WeIqraw0k6ybKkQStZNMHmwMGdxNKoukwHyjVTQFLnqHMb/cW47mZCRDfZayI4vrsXbKMzRE415kH8TfPQB3EmoPCDBfW7HKxnG91iLdXy7OikO9HJicXxY8jSd3AV8RGvIvqfdprJKoivsDJkCHpmtW+0WsjrggcNRDiQLpKq6RuZU+BuAvtUoScMpK/v1q8zA7TyPINhS2HwNHgYcpqV3OPGeLrGYRDSRNluVmeEQnBChPjGTDXoYXAjj22eKCzVHB7TBih9HY6bJnXdld5zTHWhOLHbisB12Ih4z1JLlArvBMpqulu7TE9VlzgQYpmDOOGB7Ni1ZkU= 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 Zi, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on next-20241101] [cannot apply to linus/master v6.12-rc5] [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/Zi-Yan/mm-huge_memory-add-two-new-yet-used-functions-for-folio_split/20241101-230623 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20241101150357.1752726-7-ziy%40nvidia.com patch subject: [PATCH v2 6/6] mm/truncate: use folio_split() for truncate operation. config: arm-multi_v4t_defconfig (https://download.01.org/0day-ci/archive/20241102/202411022321.XN6rYrgx-lkp@intel.com/config) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 639a7ac648f1e50ccd2556e17d401c04f9cce625) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241102/202411022321.XN6rYrgx-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/202411022321.XN6rYrgx-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from mm/truncate.c:12: In file included from include/linux/backing-dev.h:16: In file included from include/linux/writeback.h:13: In file included from include/linux/blk_types.h:10: In file included from include/linux/bvec.h:10: In file included from include/linux/highmem.h:8: In file included from include/linux/cacheflush.h:5: In file included from arch/arm/include/asm/cacheflush.h:10: In file included from include/linux/mm.h:2211: 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_" | ~~~~~~~~~~~ ^ ~~~ In file included from mm/truncate.c:24: In file included from mm/internal.h:13: include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 49 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/truncate.c:214:6: error: call to undeclared function 'split_folio_at'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 214 | if (split_folio_at(folio, folio_page(folio, in_folio_offset), NULL) == 0) | ^ 3 warnings and 1 error generated. vim +/split_folio_at +214 mm/truncate.c 166 167 /* 168 * Handle partial folios. The folio may be entirely within the 169 * range if a split has raced with us. If not, we zero the part of the 170 * folio that's within the [start, end] range, and then split the folio if 171 * it's large. split_page_range() will discard pages which now lie beyond 172 * i_size, and we rely on the caller to discard pages which lie within a 173 * newly created hole. 174 * 175 * Returns false if splitting failed so the caller can avoid 176 * discarding the entire folio which is stubbornly unsplit. 177 */ 178 bool truncate_inode_partial_folio(struct folio *folio, loff_t start, loff_t end) 179 { 180 loff_t pos = folio_pos(folio); 181 unsigned int offset, length; 182 long in_folio_offset; 183 184 if (pos < start) 185 offset = start - pos; 186 else 187 offset = 0; 188 length = folio_size(folio); 189 if (pos + length <= (u64)end) 190 length = length - offset; 191 else 192 length = end + 1 - pos - offset; 193 194 folio_wait_writeback(folio); 195 if (length == folio_size(folio)) { 196 truncate_inode_folio(folio->mapping, folio); 197 return true; 198 } 199 200 /* 201 * We may be zeroing pages we're about to discard, but it avoids 202 * doing a complex calculation here, and then doing the zeroing 203 * anyway if the page split fails. 204 */ 205 if (!mapping_inaccessible(folio->mapping)) 206 folio_zero_range(folio, offset, length); 207 208 if (folio_needs_release(folio)) 209 folio_invalidate(folio, offset, length); 210 if (!folio_test_large(folio)) 211 return true; 212 213 in_folio_offset = PAGE_ALIGN_DOWN(offset) / PAGE_SIZE; > 214 if (split_folio_at(folio, folio_page(folio, in_folio_offset), NULL) == 0) 215 return true; 216 if (folio_test_dirty(folio)) 217 return false; 218 truncate_inode_folio(folio->mapping, folio); 219 return true; 220 } 221 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki