From: kernel test robot <lkp@intel.com>
To: Roman Kagan <rkagan@amazon.de>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Ben Segall <bsegall@google.com>,
Zhang Qiao <zhangqiao22@huawei.com>,
Ingo Molnar <mingo@redhat.com>, Waiman Long <longman@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Valentin Schneider <vschneid@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Mel Gorman <mgorman@suse.de>, Juri Lelli <juri.lelli@redhat.com>
Subject: Re: [PATCH] sched/fair: sanitize vruntime of entity being placed
Date: Sat, 28 Jan 2023 14:42:57 +0800 [thread overview]
Message-ID: <202301281410.4cvSCADA-lkp@intel.com> (raw)
In-Reply-To: <20230127163230.3339408-1-rkagan@amazon.de>
Hi Roman,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/sched/core]
[also build test WARNING on linus/master v6.2-rc5 next-20230127]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Roman-Kagan/sched-fair-sanitize-vruntime-of-entity-being-placed/20230128-130846
patch link: https://lore.kernel.org/r/20230127163230.3339408-1-rkagan%40amazon.de
patch subject: [PATCH] sched/fair: sanitize vruntime of entity being placed
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230128/202301281410.4cvSCADA-lkp@intel.com/config)
compiler: m68k-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://github.com/intel-lab-lkp/linux/commit/2db31a18bcb88c280481672d7721f7e003d8df5a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Roman-Kagan/sched-fair-sanitize-vruntime-of-entity-being-placed/20230128-130846
git checkout 2db31a18bcb88c280481672d7721f7e003d8df5a
# 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=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash kernel/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/fair.c:688:5: warning: no previous prototype for 'sched_update_scaling' [-Wmissing-prototypes]
688 | int sched_update_scaling(void)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/fair.c: In function 'place_entity':
>> kernel/sched/fair.c:4697:34: warning: integer overflow in expression of type 'long int' results in '-129542144' [-Woverflow]
4697 | if ((s64)sleep_time > 60 * NSEC_PER_SEC)
| ^
vim +4697 kernel/sched/fair.c
4654
4655 static void
4656 place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
4657 {
4658 u64 vruntime = cfs_rq->min_vruntime;
4659 u64 sleep_time;
4660
4661 /*
4662 * The 'current' period is already promised to the current tasks,
4663 * however the extra weight of the new task will slow them down a
4664 * little, place the new task so that it fits in the slot that
4665 * stays open at the end.
4666 */
4667 if (initial && sched_feat(START_DEBIT))
4668 vruntime += sched_vslice(cfs_rq, se);
4669
4670 /* sleeps up to a single latency don't count. */
4671 if (!initial) {
4672 unsigned long thresh;
4673
4674 if (se_is_idle(se))
4675 thresh = sysctl_sched_min_granularity;
4676 else
4677 thresh = sysctl_sched_latency;
4678
4679 /*
4680 * Halve their sleep time's effect, to allow
4681 * for a gentler effect of sleepers:
4682 */
4683 if (sched_feat(GENTLE_FAIR_SLEEPERS))
4684 thresh >>= 1;
4685
4686 vruntime -= thresh;
4687 }
4688
4689 /*
4690 * Pull vruntime of the entity being placed to the base level of
4691 * cfs_rq, to prevent boosting it if placed backwards. If the entity
4692 * slept for a long time, don't even try to compare its vruntime with
4693 * the base as it may be too far off and the comparison may get
4694 * inversed due to s64 overflow.
4695 */
4696 sleep_time = rq_clock_task(rq_of(cfs_rq)) - se->exec_start;
> 4697 if ((s64)sleep_time > 60 * NSEC_PER_SEC)
4698 se->vruntime = vruntime;
4699 else
4700 se->vruntime = max_vruntime(se->vruntime, vruntime);
4701 }
4702
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-01-28 6:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-27 16:32 [PATCH] sched/fair: sanitize vruntime of entity being placed Roman Kagan
2023-01-28 6:42 ` kernel test robot [this message]
2023-01-28 7:45 ` kernel test robot
2023-01-28 10:41 ` Zhang Qiao
2023-01-28 17:27 ` Chen Yu
2023-01-29 1:27 ` Zhang Qiao
2023-01-30 13:15 ` Chen Yu
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=202301281410.4cvSCADA-lkp@intel.com \
--to=lkp@intel.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=rkagan@amazon.de \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=zhangqiao22@huawei.com \
/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.