[PATCH v2] tools/runqslower: use __state instead of state

Subsystems: bpf [general] (safe dynamic programs and tools), the rest

STALE1868d REVIEWED: 1 (0M)

1 review trailer.

3 messages, 2 authors, 2021-07-14 · open the first message on its own page

[PATCH v2] tools/runqslower: use __state instead of state

From: SanjayKumar J <hidden>
Date: 2021-07-07 05:15:34

Commit 2f064a59a11f: sched: Change task_struct::state
renamed task->state to task->__state in task_struct

Acked-by: Yonghong Song <redacted>
Signed-off-by: SanjayKumar Jeyakumar <redacted>
---
 tools/bpf/runqslower/runqslower.bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/runqslower/runqslower.bpf.c b/tools/bpf/runqslower/runqslower.bpf.c
index 645530ca7e98..ab9353f2fd46 100644
--- a/tools/bpf/runqslower/runqslower.bpf.c
+++ b/tools/bpf/runqslower/runqslower.bpf.c
@@ -74,7 +74,7 @@ int handle__sched_switch(u64 *ctx)
 	u32 pid;
 
 	/* ivcsw: treat like an enqueue event and store timestamp */
-	if (prev->state == TASK_RUNNING)
+	if (prev->__state == TASK_RUNNING)
 		trace_enqueue(prev);
 
 	pid = next->pid;
-- 
2.32.0

Re: [PATCH v2] tools/runqslower: use __state instead of state

From: kernel test robot <hidden>
Date: 2021-07-12 17:42:54

Hi SanjayKumar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on vhost/linux-next ipvs/master v5.14-rc1]
[cannot apply to bpf/master next-20210712]
[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]

url:    https://github.com/0day-ci/linux/commits/SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703
        git checkout 0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash -C tools/testing/selftests/bpf install

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):
quoted
runqslower.bpf.c:77:12: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?
           if (prev->__state == TASK_RUNNING)
                     ^~~~~~~
                     state
   /tools/vmlinux.h:1096:20: note: 'state' declared here
           volatile long int state;
                             ^
   1 error generated.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Re: [PATCH v2] tools/runqslower: use __state instead of state

From: Sanjay Kumar J <hidden>
Date: 2021-07-14 05:13:58

On Mon, Jul 12, 2021 at 11:12 PM kernel test robot [off-list ref] wrote:
Hi SanjayKumar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on vhost/linux-next ipvs/master v5.14-rc1]
[cannot apply to bpf/master next-20210712]
[If your patch is applied to the wrong git tree, kindly drop us a note.
v4 version of the patch is already accepted in bpf tree
commit-id:5616e895ecc56 and also in net tree ommit:5616e895ecc56
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703
        git checkout 0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash -C tools/testing/selftests/bpf install

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):
quoted
quoted
runqslower.bpf.c:77:12: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?
           if (prev->__state == TASK_RUNNING)
                     ^~~~~~~
                     state
   /tools/vmlinux.h:1096:20: note: 'state' declared here
           volatile long int state;
                             ^
   1 error generated.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help