From: kernel test robot <lkp@intel.com>
To: zihan zhou <15645113830zzh@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: [peterz-queue:sched/core 1/5] kernel/sched/fair.c:942:40: error: invalid operands to binary expression ('int' and 'void')
Date: Thu, 13 Feb 2025 23:50:45 +0800 [thread overview]
Message-ID: <202502132351.2AEevb2A-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: f5e5644f37620a7177ec30bf771fe90926ed9e7a
commit: a776cf5efa44410204ec367cd593ad56b9d3df5e [1/5] sched: Cancel the slice protection of the idle entity
config: i386-buildonly-randconfig-003-20250213 (https://download.01.org/0day-ci/archive/20250213/202502132351.2AEevb2A-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502132351.2AEevb2A-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/202502132351.2AEevb2A-lkp@intel.com/
All errors (new ones prefixed by >>):
kernel/sched/fair.c:897:11: warning: equality comparison result unused [-Wunused-comparison]
897 | se->vlag == se->deadline;
| ~~~~~~~~~^~~~~~~~~~~~~~~
kernel/sched/fair.c:897:11: note: use '=' to turn this equality comparison into an assignment
897 | se->vlag == se->deadline;
| ^~
| =
kernel/sched/fair.c:902:2: error: statement requires expression of scalar type ('void' invalid)
902 | if (protect_slice(se))
| ^ ~~~~~~~~~~~~~~~~~
>> kernel/sched/fair.c:942:40: error: invalid operands to binary expression ('int' and 'void')
942 | if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
1 warning and 2 errors generated.
vim +942 kernel/sched/fair.c
905
906 /*
907 * Earliest Eligible Virtual Deadline First
908 *
909 * In order to provide latency guarantees for different request sizes
910 * EEVDF selects the best runnable task from two criteria:
911 *
912 * 1) the task must be eligible (must be owed service)
913 *
914 * 2) from those tasks that meet 1), we select the one
915 * with the earliest virtual deadline.
916 *
917 * We can do this in O(log n) time due to an augmented RB-tree. The
918 * tree keeps the entries sorted on deadline, but also functions as a
919 * heap based on the vruntime by keeping:
920 *
921 * se->min_vruntime = min(se->vruntime, se->{left,right}->min_vruntime)
922 *
923 * Which allows tree pruning through eligibility.
924 */
925 static struct sched_entity *pick_eevdf(struct cfs_rq *cfs_rq)
926 {
927 struct rb_node *node = cfs_rq->tasks_timeline.rb_root.rb_node;
928 struct sched_entity *se = __pick_first_entity(cfs_rq);
929 struct sched_entity *curr = cfs_rq->curr;
930 struct sched_entity *best = NULL;
931
932 /*
933 * We can safely skip eligibility check if there is only one entity
934 * in this cfs_rq, saving some cycles.
935 */
936 if (cfs_rq->nr_queued == 1)
937 return curr && curr->on_rq ? curr : se;
938
939 if (curr && (!curr->on_rq || !entity_eligible(cfs_rq, curr)))
940 curr = NULL;
941
> 942 if (sched_feat(RUN_TO_PARITY) && curr && protect_slice(curr))
943 return curr;
944
945 /* Pick the leftmost entity if it's eligible */
946 if (se && entity_eligible(cfs_rq, se)) {
947 best = se;
948 goto found;
949 }
950
951 /* Heap search for the EEVD entity */
952 while (node) {
953 struct rb_node *left = node->rb_left;
954
955 /*
956 * Eligible entities in left subtree are always better
957 * choices, since they have earlier deadlines.
958 */
959 if (left && vruntime_eligible(cfs_rq,
960 __node_2_se(left)->min_vruntime)) {
961 node = left;
962 continue;
963 }
964
965 se = __node_2_se(node);
966
967 /*
968 * The left subtree either is empty or has no eligible
969 * entity, so check the current node since it is the one
970 * with earliest deadline that might be eligible.
971 */
972 if (entity_eligible(cfs_rq, se)) {
973 best = se;
974 break;
975 }
976
977 node = node->rb_right;
978 }
979 found:
980 if (!best || (curr && entity_before(curr, best)))
981 best = curr;
982
983 return best;
984 }
985
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-13 15:50 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=202502132351.2AEevb2A-lkp@intel.com \
--to=lkp@intel.com \
--cc=15645113830zzh@gmail.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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 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.