Re: [PATCH 3/3] ring-buffer: Add rb_time_t 64 bit operations for speeding up 32 bit
From: kernel test robot
Date: Sat Jun 27 2020 - 02:44:09 EST
Hi Steven,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc2 next-20200626]
[cannot apply to tip/perf/core linux/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Steven-Rostedt/ring-buffer-Restructure-ftrace-ring-buffer-time-keeping-to-allow-accurate-nested-timing/20200627-091520
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1590a2e1c681b0991bd42c992cabfd380e0338f2
config: i386-randconfig-m021-20200624 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
smatch warnings:
kernel/trace/ring_buffer.c:685 rb_time_cmpxchg() warn: inconsistent indenting
vim +685 kernel/trace/ring_buffer.c
677
678 static int rb_time_cmpxchg(rb_time_t *t, u64 expect, u64 set)
679 {
680 unsigned long cnt, top, bottom;
681 unsigned long cnt2, top2, bottom2;
682 u64 val;
683
684 /* The cmpxchg always fails if it interrupted an update */
> 685 if (!__rb_time_read(t, &val, &cnt2))
686 return false;
687
688 if (val != expect)
689 return false;
690
691 cnt = local_read(&t->cnt);
692 if ((cnt & 3) != cnt2)
693 return false;
694
695 cnt2 = cnt + 1;
696
697 rb_time_split(val, &top, &bottom);
698 top = rb_time_val_cnt(top, cnt);
699 bottom = rb_time_val_cnt(bottom, cnt);
700
701 rb_time_split(set, &top2, &bottom2);
702 top2 = rb_time_val_cnt(top2, cnt2);
703 bottom2 = rb_time_val_cnt(bottom2, cnt2);
704
705 if (!rb_time_read_cmpxchg(&t->cnt, cnt, cnt2))
706 return false;
707 if (!rb_time_read_cmpxchg(&t->top, top, top2))
708 return false;
709 if (!rb_time_read_cmpxchg(&t->bottom, bottom, bottom2))
710 return false;
711 return true;
712 }
713
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip