All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sidhartha Kumar <sidhartha.kumar@oracle.com>
To: kernel test robot <lkp@intel.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	maple-tree@lists.infradead.org
Cc: oe-kbuild-all@lists.linux.dev, akpm@linux-foundation.org,
	willy@infradead.org, liam.howlett@oracle.com,
	zhangpeng.00@bytedance.com
Subject: Re: [PATCH 1/3] maple_tree: introduce mas_prealloc_calc()
Date: Tue, 10 Oct 2023 15:13:13 -0700	[thread overview]
Message-ID: <9085d7dd-72b6-840a-86ee-86aaa9e77902@oracle.com> (raw)
In-Reply-To: <202310100603.qsn3ruBx-lkp@intel.com>

On 10/9/23 3:25 PM, kernel test robot wrote:
> Hi Sidhartha,
> 
> 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.6-rc5 next-20231009]
> [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/Sidhartha-Kumar/maple_tree-introduce-mas_prealloc_calc/20231010-041859
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> patch link:    https://lore.kernel.org/r/20231009201639.920512-2-sidhartha.kumar%40oracle.com
> patch subject: [PATCH 1/3] maple_tree: introduce mas_prealloc_calc()
> config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231010/202310100603.qsn3ruBx-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231010/202310100603.qsn3ruBx-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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202310100603.qsn3ruBx-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>>> lib/maple_tree.c:5428:5: warning: no previous prototype for 'mas_prealloc_calc' [-Wmissing-prototypes]
>      5428 | int mas_prealloc_calc(struct ma_wr_state *wr_mas)
>           |     ^~~~~~~~~~~~~~~~~
> 
> 
> vim +/mas_prealloc_calc +5428 lib/maple_tree.c
> 
>    5420	
>    5421	/**
>    5422	 * mas_prealloc_calc() - Calculate number of nodes needed for a
>    5423	 * store operation.
>    5424	 * @wr_mas: The maple write state
>    5425	 *
>    5426	 * Return: Number of nodes required for preallocation.
>    5427	 */
>> 5428	int mas_prealloc_calc(struct ma_wr_state *wr_mas)

Adding static inline should fix this compilation error.

>    5429	{
>    5430		struct ma_state *mas = wr_mas->mas;
>    5431		unsigned char node_size;
>    5432	
>    5433		if (unlikely(!mas->index && mas->last == ULONG_MAX))
>    5434			return 1;
>    5435	
>    5436		/* Root expand */
>    5437		if (unlikely(mas_is_none(mas) || mas_is_ptr(mas)))
>    5438			return 1;
>    5439	
>    5440		if (unlikely(!mas_wr_walk(wr_mas))) {
>    5441			/* Spanning store, use worst case for now */
>    5442			return 1 + mas_mt_height(mas) * 3;
>    5443		}
>    5444	
>    5445		/* At this point, we are at the leaf node that needs to be altered. */
>    5446		/* Exact fit, no nodes needed. */
>    5447		if (wr_mas->r_min == mas->index && wr_mas->r_max == mas->last)
>    5448			return 0;
>    5449	
>    5450		mas_wr_end_piv(wr_mas);
>    5451		node_size = mas_wr_new_end(wr_mas);
>    5452		if (node_size >= mt_slots[wr_mas->type]) {
>    5453			/* Split, worst case for now. */
>    5454			return 1 + mas_mt_height(mas) * 2;
>    5455		}
>    5456	
>    5457		/* New root needs a singe node */
>    5458		if (unlikely(mte_is_root(mas->node)))
>    5459			return 1;
>    5460	
>    5461		/* Potential spanning rebalance collapsing a node, use worst-case */
>    5462		if (node_size  - 1 <= mt_min_slots[wr_mas->type])
>    5463			return mas_mt_height(mas) * 2 - 1;
>    5464	
>    5465		/* node store, slot store needs one node */
>    5466		return 1;
>    5467	}
>    5468	
> 


  reply	other threads:[~2023-10-10 22:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 20:16 [PATCH 0/3] align maple tree write paths Sidhartha Kumar
2023-10-09 20:16 ` [PATCH 1/3] maple_tree: introduce mas_prealloc_calc() Sidhartha Kumar
2023-10-09 22:25   ` kernel test robot
2023-10-10 22:13     ` Sidhartha Kumar [this message]
2023-10-10 11:06   ` kernel test robot
2023-10-18  2:53   ` kernel test robot
2023-10-09 20:16 ` [PATCH 2/3] maple_tree: use preallocations in mas_store_gfp() Sidhartha Kumar
2023-10-10  3:03   ` Peng Zhang
2023-10-11  0:17     ` Sidhartha Kumar
2023-10-11  7:40       ` Peng Zhang
2023-10-10 18:15   ` Liam R. Howlett
2023-10-25  9:52   ` kernel test robot
2023-10-26 17:16     ` Liam R. Howlett
2023-10-27  5:59       ` Oliver Sang
2023-11-01 16:59         ` Liam R. Howlett
2023-11-03  2:37           ` Oliver Sang
2023-10-09 20:16 ` [PATCH 3/3] maple_tree: use preallocations in mas_erase() Sidhartha Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9085d7dd-72b6-840a-86ee-86aaa9e77902@oracle.com \
    --to=sidhartha.kumar@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=liam.howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=maple-tree@lists.infradead.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.org \
    --cc=zhangpeng.00@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.