oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Qais Yousef <qyousef@layalina.io>
To: kernel test robot <lkp@intel.com>
Cc: Qais Yousef <qais.yousef@arm.com>,
	oe-kbuild-all@lists.linux.dev, Sasha Levin <sashal@kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [linux-stable-rc:queue/5.10 96/108] kernel/sched/sched.h:2560:27: error: 'struct rq' has no member named 'cpu_capacity_inverted'
Date: Wed, 15 Mar 2023 12:44:04 +0000	[thread overview]
Message-ID: <20230315124404.3266l6k3ygsyempp@airbuntu> (raw)
In-Reply-To: <202303151800.NP9tJsgK-lkp@intel.com>

On 03/15/23 19:01, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git queue/5.10
> head:   e6a15a9d1bcf661f6bb79a1c2dce0c796234ac80
> commit: db4f76185823d00afb688cbd63fdf7200de209ea [96/108] sched/fair: Detect capacity inversion
> config: riscv-allnoconfig (https://download.01.org/0day-ci/archive/20230315/202303151800.NP9tJsgK-lkp@intel.com/config)
> compiler: riscv64-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=db4f76185823d00afb688cbd63fdf7200de209ea
>         git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
>         git fetch --no-tags linux-stable-rc queue/5.10
>         git checkout db4f76185823d00afb688cbd63fdf7200de209ea
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash kernel/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303151800.NP9tJsgK-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from kernel/sched/core.c:13:
>    kernel/sched/sched.h: In function 'cpu_in_capacity_inversion':
> >> kernel/sched/sched.h:2560:27: error: 'struct rq' has no member named 'cpu_capacity_inverted'
>     2560 |         return cpu_rq(cpu)->cpu_capacity_inverted;
>          |                           ^~
>    kernel/sched/core.c: In function 'ttwu_stat':
>    kernel/sched/core.c:2430:20: warning: variable 'rq' set but not used [-Wunused-but-set-variable]
>     2430 |         struct rq *rq;
>          |                    ^~
> --
>    In file included from kernel/sched/loadavg.c:9:
>    kernel/sched/sched.h: In function 'cpu_in_capacity_inversion':
> >> kernel/sched/sched.h:2560:27: error: 'struct rq' has no member named 'cpu_capacity_inverted'
>     2560 |         return cpu_rq(cpu)->cpu_capacity_inverted;
>          |                           ^~

Need to extend the #ifdef CONFIG_SMP to wrap the new functioin

	diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
	index 10b717533f62..852e856eed48 100644
	--- a/kernel/sched/sched.h
	+++ b/kernel/sched/sched.h
	@@ -2540,7 +2540,6 @@ static inline unsigned long capacity_orig_of(int cpu)
	 {
		return cpu_rq(cpu)->cpu_capacity_orig;
	 }
	-#endif

	 /*
	  * Returns inverted capacity if the CPU is in capacity inversion state.
	@@ -2559,6 +2558,7 @@ static inline unsigned long cpu_in_capacity_inversion(int cpu)
	 {
		return cpu_rq(cpu)->cpu_capacity_inverted;
	 }
	+#endif

	 /**
	  * enum schedutil_type - CPU utilization type

Should I resend with the fix applied?


Thanks!

--
Qais Yousef

> 
> 
> vim +2560 kernel/sched/sched.h
> 
>   2544	
>   2545	/*
>   2546	 * Returns inverted capacity if the CPU is in capacity inversion state.
>   2547	 * 0 otherwise.
>   2548	 *
>   2549	 * Capacity inversion detection only considers thermal impact where actual
>   2550	 * performance points (OPPs) gets dropped.
>   2551	 *
>   2552	 * Capacity inversion state happens when another performance domain that has
>   2553	 * equal or lower capacity_orig_of() becomes effectively larger than the perf
>   2554	 * domain this CPU belongs to due to thermal pressure throttling it hard.
>   2555	 *
>   2556	 * See comment in update_cpu_capacity().
>   2557	 */
>   2558	static inline unsigned long cpu_in_capacity_inversion(int cpu)
>   2559	{
> > 2560		return cpu_rq(cpu)->cpu_capacity_inverted;
>   2561	}
>   2562	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests

  reply	other threads:[~2023-03-15 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 11:01 [linux-stable-rc:queue/5.10 96/108] kernel/sched/sched.h:2560:27: error: 'struct rq' has no member named 'cpu_capacity_inverted' kernel test robot
2023-03-15 12:44 ` Qais Yousef [this message]
2023-03-16  7:42   ` Greg Kroah-Hartman

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=20230315124404.3266l6k3ygsyempp@airbuntu \
    --to=qyousef@layalina.io \
    --cc=gregkh@linuxfoundation.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=sashal@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).