[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202409291101.6NdtMFVC-lkp@intel.com>
Date: Sun, 29 Sep 2024 11:12:29 +0800
From: kernel test robot <lkp@...el.com>
To: Yevgeny Kliteynik <kliteyn@...dia.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Saeed Mahameed <saeedm@...dia.com>,
Erez Shitrit <erezsh@...dia.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_bwc.c:708:17:
warning: large atomic operation may incur significant performance penalty;
the access size (4 bytes) exceeds the max lock-free size (0 bytes)
Hi Yevgeny,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3efc57369a0ce8f76bf0804f7e673982384e4ac9
commit: 510f9f61a1121a296a45962760d5e2824277fa37 net/mlx5: HWS, added API and enabled HWS support
date: 3 weeks ago
config: arm-randconfig-r052-20240929 (https://download.01.org/0day-ci/archive/20240929/202409291101.6NdtMFVC-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409291101.6NdtMFVC-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409291101.6NdtMFVC-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_bwc.c:4:
In file included from drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_internal.h:7:
In file included from include/linux/mlx5/transobj.h:36:
In file included from include/linux/mlx5/driver.h:38:
In file included from include/linux/pci.h:1646:
In file included from include/linux/dmapool.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2232:
include/linux/vmstat.h:517:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
517 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_bwc.c:708:17: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
708 | num_of_rules = __atomic_load_n(&bwc_matcher->num_of_rules, __ATOMIC_RELAXED);
| ^
2 warnings generated.
vim +708 drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_bwc.c
2111bb970c787b Yevgeny Kliteynik 2024-06-20 690
2111bb970c787b Yevgeny Kliteynik 2024-06-20 691 static int
2111bb970c787b Yevgeny Kliteynik 2024-06-20 692 hws_bwc_matcher_rehash_size(struct mlx5hws_bwc_matcher *bwc_matcher)
2111bb970c787b Yevgeny Kliteynik 2024-06-20 693 {
2111bb970c787b Yevgeny Kliteynik 2024-06-20 694 u32 num_of_rules;
2111bb970c787b Yevgeny Kliteynik 2024-06-20 695 int ret;
2111bb970c787b Yevgeny Kliteynik 2024-06-20 696
2111bb970c787b Yevgeny Kliteynik 2024-06-20 697 /* If the current matcher size is already at its max size, we can't
2111bb970c787b Yevgeny Kliteynik 2024-06-20 698 * do the rehash. Skip it and try adding the rule again - perhaps
2111bb970c787b Yevgeny Kliteynik 2024-06-20 699 * there was some change.
2111bb970c787b Yevgeny Kliteynik 2024-06-20 700 */
2111bb970c787b Yevgeny Kliteynik 2024-06-20 701 if (hws_bwc_matcher_size_maxed_out(bwc_matcher))
2111bb970c787b Yevgeny Kliteynik 2024-06-20 702 return 0;
2111bb970c787b Yevgeny Kliteynik 2024-06-20 703
2111bb970c787b Yevgeny Kliteynik 2024-06-20 704 /* It is possible that other rule has already performed rehash.
2111bb970c787b Yevgeny Kliteynik 2024-06-20 705 * Need to check again if we really need rehash.
2111bb970c787b Yevgeny Kliteynik 2024-06-20 706 * If the reason for rehash was size, but not any more - skip rehash.
2111bb970c787b Yevgeny Kliteynik 2024-06-20 707 */
2111bb970c787b Yevgeny Kliteynik 2024-06-20 @708 num_of_rules = __atomic_load_n(&bwc_matcher->num_of_rules, __ATOMIC_RELAXED);
2111bb970c787b Yevgeny Kliteynik 2024-06-20 709 if (!hws_bwc_matcher_rehash_size_needed(bwc_matcher, num_of_rules))
2111bb970c787b Yevgeny Kliteynik 2024-06-20 710 return 0;
2111bb970c787b Yevgeny Kliteynik 2024-06-20 711
2111bb970c787b Yevgeny Kliteynik 2024-06-20 712 /* Now we're done all the checking - do the rehash:
2111bb970c787b Yevgeny Kliteynik 2024-06-20 713 * - extend match RTC size
2111bb970c787b Yevgeny Kliteynik 2024-06-20 714 * - create new matcher
2111bb970c787b Yevgeny Kliteynik 2024-06-20 715 * - move all the rules to the new matcher
2111bb970c787b Yevgeny Kliteynik 2024-06-20 716 * - destroy the old matcher
2111bb970c787b Yevgeny Kliteynik 2024-06-20 717 */
2111bb970c787b Yevgeny Kliteynik 2024-06-20 718
2111bb970c787b Yevgeny Kliteynik 2024-06-20 719 ret = hws_bwc_matcher_extend_size(bwc_matcher);
2111bb970c787b Yevgeny Kliteynik 2024-06-20 720 if (ret)
2111bb970c787b Yevgeny Kliteynik 2024-06-20 721 return ret;
2111bb970c787b Yevgeny Kliteynik 2024-06-20 722
2111bb970c787b Yevgeny Kliteynik 2024-06-20 723 return hws_bwc_matcher_move(bwc_matcher);
2111bb970c787b Yevgeny Kliteynik 2024-06-20 724 }
2111bb970c787b Yevgeny Kliteynik 2024-06-20 725
:::::: The code at line 708 was first introduced by commit
:::::: 2111bb970c787b16b002dc726c1d296ce87a00fb net/mlx5: HWS, added backward-compatible API handling
:::::: TO: Yevgeny Kliteynik <kliteyn@...dia.com>
:::::: CC: Saeed Mahameed <saeedm@...dia.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists