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 82965E7717D for ; Wed, 11 Dec 2024 19:35:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17D856B0085; Wed, 11 Dec 2024 14:35:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 105B46B0088; Wed, 11 Dec 2024 14:35:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC0F96B0089; Wed, 11 Dec 2024 14:35:49 -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 C57626B0085 for ; Wed, 11 Dec 2024 14:35:49 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E41CF43D4D for ; Wed, 11 Dec 2024 19:35:48 +0000 (UTC) X-FDA: 82883682294.07.BE70594 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by imf11.hostedemail.com (Postfix) with ESMTP id BB6D740019 for ; Wed, 11 Dec 2024 19:35:24 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BkD9dynU; spf=pass (imf11.hostedemail.com: domain of lkp@intel.com designates 192.198.163.15 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=1733945722; 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: references:dkim-signature; bh=bzOEQhkPKZi+bhSEkRD8UQoYe0hsFTL0K32vwv8YzS0=; b=cvrpplvPoqTjzl9njsP1LAquL16yBekKARk/zSeimrrc1qTDRvov8QPP5oP6Oklza3nOfc XoC+KbXhrZE5xRVAESacHtX75Se6KIJ9UzmrN5xX7LqCYCSzDGTIMr1hCrKIvj1YssnjST v3bTvfZlG6Q1HhzkLYYBMrx/3O+PjfI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733945722; a=rsa-sha256; cv=none; b=viT3e2/5NbG5E9De9W3nqMsD3nT+YTd/GsbgdDSfyYv/RonlIO2x4Rq+c+xtlg+CxhI3PT 6hAXoPlfBac20QbZXYnnf5KwQCT8GbjRTsIIGGybwFSqAw/YTYhsjC1OkxAI8Y6Bpur0l9 RyWohNQP2H9Cjl7ONLyYtu1zyiggjoI= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BkD9dynU; spf=pass (imf11.hostedemail.com: domain of lkp@intel.com designates 192.198.163.15 as permitted sender) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733945746; x=1765481746; h=date:from:to:cc:subject:message-id:mime-version; bh=rAWTaFvq5MIpa9rJe2/Ev2vblQZ6ykreEvwH2RKsHEA=; b=BkD9dynUEx2wBICPB0G19IpPeRHYF1NWamzqw3GmkAEgIaxkFhLwHNnD jl1IFkEqQJRXRjV0j+3gMKSUYKAn36+/jLOXPg9LUihCXvRVARE7SY1VD He5tPHWS8k21sPxE7kQHw/FNWLKV0DMHz1oRUry9rKjvaG2IdQHOzNe98 F/+Ka/TekD5ce8unN/E9gbBtKO1gF9hqtXrnuhLqYsLKufa8IZKZqhLDo wtTGiVC5hAfTyRIIEkBaHJGXyO1zzhuADuSYsGPAEE27LoxvXkN5RR4Gl QGeqlbU8raJICvSX0t/3kyrQeJEvQC+C4YRuC/wqfZwBoF5ZQFWx90C7n A==; X-CSE-ConnectionGUID: el6SPOAGRz6zye2E8JeHNg== X-CSE-MsgGUID: 6Xo6wd7RSqOT29piCEv/Gg== X-IronPort-AV: E=McAfee;i="6700,10204,11283"; a="34471962" X-IronPort-AV: E=Sophos;i="6.12,226,1728975600"; d="scan'208";a="34471962" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2024 11:35:45 -0800 X-CSE-ConnectionGUID: E5lzs75VQjenbl16v6Cmyg== X-CSE-MsgGUID: g6VEbvrkTai79NfI9ODwVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="100999199" Received: from lkp-server01.sh.intel.com (HELO 82a3f569d0cb) ([10.239.97.150]) by orviesa003.jf.intel.com with ESMTP; 11 Dec 2024 11:35:43 -0800 Received: from kbuild by 82a3f569d0cb with local (Exim 4.96) (envelope-from ) id 1tLSUm-00071s-3D; Wed, 11 Dec 2024 19:35:40 +0000 Date: Thu, 12 Dec 2024 03:35:04 +0800 From: kernel test robot To: David Laight Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List Subject: [linux-next:master 1948/2656] block/blk-iocost.c:1101:11: error: call to __compiletime_assert_560 declared with 'error' attribute: clamp() low limit 1 greater than high limit active Message-ID: <202412120322.3GfVe3vF-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: BB6D740019 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: prb64mt4dp6t9fkz87tbq1dwxceois4s X-HE-Tag: 1733945724-248350 X-HE-Meta: U2FsdGVkX19WOcHv/vpJrkK8o9sqV7W4yyHZN6GDH3ROW7T/ysWSZtyBgYJHU/Q4t/9X2K2eGQ2XTzYUzeL+TwWhHd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eNgeEP+pd40uy57k/6NKEH+p4S8H+wgii4SE1Bg214pGJNJWbW/cGdlDq20GGHQVCBOus7xnL6VRSkWaMJnYksqx21/wNc+zAVUYQc35QJUtlomqcEHnuCvis64IALZVSjEi32qnZE+e/4XRKqpOH5Hlb6vyP25bVA8IRIRgbZBvXbSq/ebjDQSjOkx+pom7nsg== 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: tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 91e71d606356e50f238d7a87aacdee4abc427f07 commit: 212fe932ee57ec4a0f41bdc42b58c64fe3062147 [1948/2656] minmax.h: simplify the variants of clamp() config: s390-defconfig (https://download.01.org/0day-ci/archive/20241212/202412120322.3GfVe3vF-lkp@intel.com/config) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241212/202412120322.3GfVe3vF-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/202412120322.3GfVe3vF-lkp@intel.com/ All errors (new ones prefixed by >>): >> block/blk-iocost.c:1101:11: error: call to __compiletime_assert_560 declared with 'error' attribute: clamp() low limit 1 greater than high limit active inuse = clamp_t(u32, inuse, 1, active); ^ include/linux/minmax.h:220:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) __careful_clamp(type, val, lo, hi) ^ include/linux/minmax.h:197:2: note: expanded from macro '__careful_clamp' __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_)) ^ include/linux/minmax.h:190:2: note: expanded from macro '__clamp_once' BUILD_BUG_ON_MSG(statically_true(ulo > uhi), \ ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:530:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:523:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ :24:1: note: expanded from here __compiletime_assert_560 ^ >> block/blk-iocost.c:1101:11: error: call to __compiletime_assert_560 declared with 'error' attribute: clamp() low limit 1 greater than high limit active include/linux/minmax.h:220:36: note: expanded from macro 'clamp_t' #define clamp_t(type, val, lo, hi) __careful_clamp(type, val, lo, hi) ^ include/linux/minmax.h:197:2: note: expanded from macro '__careful_clamp' __clamp_once(type, val, lo, hi, __UNIQUE_ID(v_), __UNIQUE_ID(l_), __UNIQUE_ID(h_)) ^ include/linux/minmax.h:190:2: note: expanded from macro '__clamp_once' BUILD_BUG_ON_MSG(statically_true(ulo > uhi), \ ^ note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:530:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:523:4: note: expanded from macro '__compiletime_assert' prefix ## suffix(); \ ^ :24:1: note: expanded from here __compiletime_assert_560 ^ 2 errors generated. vim +/error +1101 block/blk-iocost.c 7caa47151ab2e64 Tejun Heo 2019-08-28 1078 7caa47151ab2e64 Tejun Heo 2019-08-28 1079 /* 7caa47151ab2e64 Tejun Heo 2019-08-28 1080 * Update @iocg's `active` and `inuse` to @active and @inuse, update level b0853ab4a238c54 Tejun Heo 2020-09-01 1081 * weight sums and propagate upwards accordingly. If @save, the current margin b0853ab4a238c54 Tejun Heo 2020-09-01 1082 * is saved to be used as reference for later inuse in-period adjustments. 7caa47151ab2e64 Tejun Heo 2019-08-28 1083 */ b0853ab4a238c54 Tejun Heo 2020-09-01 1084 static void __propagate_weights(struct ioc_gq *iocg, u32 active, u32 inuse, b0853ab4a238c54 Tejun Heo 2020-09-01 1085 bool save, struct ioc_now *now) 7caa47151ab2e64 Tejun Heo 2019-08-28 1086 { 7caa47151ab2e64 Tejun Heo 2019-08-28 1087 struct ioc *ioc = iocg->ioc; 7caa47151ab2e64 Tejun Heo 2019-08-28 1088 int lvl; 7caa47151ab2e64 Tejun Heo 2019-08-28 1089 7caa47151ab2e64 Tejun Heo 2019-08-28 1090 lockdep_assert_held(&ioc->lock); 7caa47151ab2e64 Tejun Heo 2019-08-28 1091 e9f4eee9a0023ba Tejun Heo 2021-05-11 1092 /* e9f4eee9a0023ba Tejun Heo 2021-05-11 1093 * For an active leaf node, its inuse shouldn't be zero or exceed e9f4eee9a0023ba Tejun Heo 2021-05-11 1094 * @active. An active internal node's inuse is solely determined by the e9f4eee9a0023ba Tejun Heo 2021-05-11 1095 * inuse to active ratio of its children regardless of @inuse. e9f4eee9a0023ba Tejun Heo 2021-05-11 1096 */ e9f4eee9a0023ba Tejun Heo 2021-05-11 1097 if (list_empty(&iocg->active_list) && iocg->child_active_sum) { e9f4eee9a0023ba Tejun Heo 2021-05-11 1098 inuse = DIV64_U64_ROUND_UP(active * iocg->child_inuse_sum, e9f4eee9a0023ba Tejun Heo 2021-05-11 1099 iocg->child_active_sum); e9f4eee9a0023ba Tejun Heo 2021-05-11 1100 } else { db84a72af6be422 Tejun Heo 2020-09-01 @1101 inuse = clamp_t(u32, inuse, 1, active); e9f4eee9a0023ba Tejun Heo 2021-05-11 1102 } db84a72af6be422 Tejun Heo 2020-09-01 1103 b0853ab4a238c54 Tejun Heo 2020-09-01 1104 iocg->last_inuse = iocg->inuse; b0853ab4a238c54 Tejun Heo 2020-09-01 1105 if (save) b0853ab4a238c54 Tejun Heo 2020-09-01 1106 iocg->saved_margin = now->vnow - atomic64_read(&iocg->vtime); b0853ab4a238c54 Tejun Heo 2020-09-01 1107 db84a72af6be422 Tejun Heo 2020-09-01 1108 if (active == iocg->active && inuse == iocg->inuse) db84a72af6be422 Tejun Heo 2020-09-01 1109 return; 7caa47151ab2e64 Tejun Heo 2019-08-28 1110 7caa47151ab2e64 Tejun Heo 2019-08-28 1111 for (lvl = iocg->level - 1; lvl >= 0; lvl--) { 7caa47151ab2e64 Tejun Heo 2019-08-28 1112 struct ioc_gq *parent = iocg->ancestors[lvl]; 7caa47151ab2e64 Tejun Heo 2019-08-28 1113 struct ioc_gq *child = iocg->ancestors[lvl + 1]; 7caa47151ab2e64 Tejun Heo 2019-08-28 1114 u32 parent_active = 0, parent_inuse = 0; 7caa47151ab2e64 Tejun Heo 2019-08-28 1115 7caa47151ab2e64 Tejun Heo 2019-08-28 1116 /* update the level sums */ 7caa47151ab2e64 Tejun Heo 2019-08-28 1117 parent->child_active_sum += (s32)(active - child->active); 7caa47151ab2e64 Tejun Heo 2019-08-28 1118 parent->child_inuse_sum += (s32)(inuse - child->inuse); e9f4eee9a0023ba Tejun Heo 2021-05-11 1119 /* apply the updates */ 7caa47151ab2e64 Tejun Heo 2019-08-28 1120 child->active = active; 7caa47151ab2e64 Tejun Heo 2019-08-28 1121 child->inuse = inuse; 7caa47151ab2e64 Tejun Heo 2019-08-28 1122 7caa47151ab2e64 Tejun Heo 2019-08-28 1123 /* 7caa47151ab2e64 Tejun Heo 2019-08-28 1124 * The delta between inuse and active sums indicates that 5ba1add216fe822 Baolin Wang 2020-11-26 1125 * much of weight is being given away. Parent's inuse 7caa47151ab2e64 Tejun Heo 2019-08-28 1126 * and active should reflect the ratio. 7caa47151ab2e64 Tejun Heo 2019-08-28 1127 */ 7caa47151ab2e64 Tejun Heo 2019-08-28 1128 if (parent->child_active_sum) { 7caa47151ab2e64 Tejun Heo 2019-08-28 1129 parent_active = parent->weight; 7caa47151ab2e64 Tejun Heo 2019-08-28 1130 parent_inuse = DIV64_U64_ROUND_UP( 7caa47151ab2e64 Tejun Heo 2019-08-28 1131 parent_active * parent->child_inuse_sum, 7caa47151ab2e64 Tejun Heo 2019-08-28 1132 parent->child_active_sum); 7caa47151ab2e64 Tejun Heo 2019-08-28 1133 } 7caa47151ab2e64 Tejun Heo 2019-08-28 1134 7caa47151ab2e64 Tejun Heo 2019-08-28 1135 /* do we need to keep walking up? */ 7caa47151ab2e64 Tejun Heo 2019-08-28 1136 if (parent_active == parent->active && 7caa47151ab2e64 Tejun Heo 2019-08-28 1137 parent_inuse == parent->inuse) 7caa47151ab2e64 Tejun Heo 2019-08-28 1138 break; 7caa47151ab2e64 Tejun Heo 2019-08-28 1139 7caa47151ab2e64 Tejun Heo 2019-08-28 1140 active = parent_active; 7caa47151ab2e64 Tejun Heo 2019-08-28 1141 inuse = parent_inuse; 7caa47151ab2e64 Tejun Heo 2019-08-28 1142 } 7caa47151ab2e64 Tejun Heo 2019-08-28 1143 7caa47151ab2e64 Tejun Heo 2019-08-28 1144 ioc->weights_updated = true; 7caa47151ab2e64 Tejun Heo 2019-08-28 1145 } 7caa47151ab2e64 Tejun Heo 2019-08-28 1146 :::::: The code at line 1101 was first introduced by commit :::::: db84a72af6be422abf2089a5896293590dda5066 blk-iocost: clamp inuse and skip noops in __propagate_weights() :::::: TO: Tejun Heo :::::: CC: Jens Axboe -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki