From: kernel test robot <lkp@intel.com>
To: Jianyong Wu <wujianyong@hygon.cn>
Cc: oe-kbuild-all@lists.linux.dev, 0day robot <lkp@intel.com>
Subject: kernel/sched/fair.c:4004:13: error: implicit declaration of function 'sched_cache_override_numa'
Date: Sun, 16 Aug 2026 07:10:28 +0200 [thread overview]
Message-ID: <202608160738.F2IHmVhf-lkp@intel.com> (raw)
tree: https://github.com/intel-lab-lkp/linux/commits/Jianyong-Wu/sched-topo-Add-some-llc-related-helpers/20260813-033153
head: 401facce126338688b04e3ec71da6345310c9a39
commit: ae33ef4db803424de60c67a6fdab44e102e92ec7 sched: Let sched cache take precedence over NUMA balancing
date: 3 days ago
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260816/202608160738.F2IHmVhf-lkp@intel.com/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/202608160738.F2IHmVhf-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/202608160738.F2IHmVhf-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/sched/fair.c: In function 'task_numa_fault':
>> kernel/sched/fair.c:4004:13: error: implicit declaration of function 'sched_cache_override_numa' [-Wimplicit-function-declaration]
4004 | if (sched_cache_override_numa())
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/sched_cache_override_numa +4004 kernel/sched/fair.c
3984
3985 /*
3986 * Got a PROT_NONE fault for a page on @node.
3987 */
3988 void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
3989 {
3990 struct task_struct *p = current;
3991 bool migrated = flags & TNF_MIGRATED;
3992 int cpu_node = task_node(current);
3993 int local = !!(flags & TNF_FAULT_LOCAL);
3994 struct numa_group *ng;
3995 int priv;
3996
3997 if (!static_branch_likely(&sched_numa_balancing))
3998 return;
3999
4000 /*
4001 * We just want to migrate page other than migrate task
4002 * once sched cache override numa balance is enabled.
4003 */
> 4004 if (sched_cache_override_numa())
4005 return;
4006
4007 /* for example, ksmd faulting in a user's mm */
4008 if (!p->mm)
4009 return;
4010
4011 /*
4012 * NUMA faults statistics are unnecessary for the slow memory
4013 * node for memory tiering mode.
4014 */
4015 if (!node_is_toptier(mem_node) &&
4016 (sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING ||
4017 !cpupid_valid(last_cpupid)))
4018 return;
4019
4020 /* Allocate buffer to track faults on a per-node basis */
4021 if (unlikely(!p->numa_faults)) {
4022 int size = sizeof(*p->numa_faults) *
4023 NR_NUMA_HINT_FAULT_BUCKETS * nr_node_ids;
4024
4025 p->numa_faults = kzalloc(size, GFP_KERNEL|__GFP_NOWARN);
4026 if (!p->numa_faults)
4027 return;
4028
4029 p->total_numa_faults = 0;
4030 memset(p->numa_faults_locality, 0, sizeof(p->numa_faults_locality));
4031 }
4032
4033 /*
4034 * First accesses are treated as private, otherwise consider accesses
4035 * to be private if the accessing pid has not changed
4036 */
4037 if (unlikely(last_cpupid == (-1 & LAST_CPUPID_MASK))) {
4038 priv = 1;
4039 } else {
4040 priv = cpupid_match_pid(p, last_cpupid);
4041 if (!priv && !(flags & TNF_NO_GROUP))
4042 task_numa_group(p, last_cpupid, flags, &priv);
4043 }
4044
4045 /*
4046 * If a workload spans multiple NUMA nodes, a shared fault that
4047 * occurs wholly within the set of nodes that the workload is
4048 * actively using should be counted as local. This allows the
4049 * scan rate to slow down when a workload has settled down.
4050 */
4051 ng = deref_curr_numa_group(p);
4052 if (!priv && !local && ng && ng->active_nodes > 1 &&
4053 numa_is_active_node(cpu_node, ng) &&
4054 numa_is_active_node(mem_node, ng))
4055 local = 1;
4056
4057 /*
4058 * Retry to migrate task to preferred node periodically, in case it
4059 * previously failed, or the scheduler moved us.
4060 */
4061 if (time_after(jiffies, p->numa_migrate_retry)) {
4062 task_numa_placement(p);
4063 numa_migrate_preferred(p);
4064 }
4065
4066 if (migrated)
4067 p->numa_pages_migrated += pages;
4068 if (flags & TNF_MIGRATE_FAIL)
4069 p->numa_faults_locality[2] += pages;
4070
4071 p->numa_faults[task_faults_idx(NUMA_MEMBUF, mem_node, priv)] += pages;
4072 p->numa_faults[task_faults_idx(NUMA_CPUBUF, cpu_node, priv)] += pages;
4073 p->numa_faults_locality[local] += pages;
4074 }
4075
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-16 5:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202608160738.F2IHmVhf-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wujianyong@hygon.cn \
/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.