From: kbuild test robot <lkp@intel.com>
To: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Juri Lelli <juri.lelli@redhat.com>,
Joel Fernandes <joelaf@google.com>,
Steve Muckle <smuckle@google.com>, Todd Kjos <tkjos@google.com>
Subject: Re: [PATCH 1/2] sched/fair: pelt: use u32 for util_avg
Date: Tue, 5 Jun 2018 09:34:22 +0800 [thread overview]
Message-ID: <201806050902.GyH994VG%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180604160600.22052-2-patrick.bellasi@arm.com>
[-- Attachment #1: Type: text/plain, Size: 3283 bytes --]
Hi Patrick,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/sched/core]
[also build test ERROR on v4.17 next-20180604]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Patrick-Bellasi/sched-fair-pelt-use-u32-for-util_avg/20180605-082640
config: i386-randconfig-s0-201822 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
kernel/sched/fair.o: In function `post_init_entity_util_avg':
>> kernel/sched/fair.c:761: undefined reference to `__udivdi3'
vim +761 kernel/sched/fair.c
724
725 /*
726 * With new tasks being created, their initial util_avgs are extrapolated
727 * based on the cfs_rq's current util_avg:
728 *
729 * util_avg = cfs_rq->util_avg / (cfs_rq->load_avg + 1) * se.load.weight
730 *
731 * However, in many cases, the above util_avg does not give a desired
732 * value. Moreover, the sum of the util_avgs may be divergent, such
733 * as when the series is a harmonic series.
734 *
735 * To solve this problem, we also cap the util_avg of successive tasks to
736 * only 1/2 of the left utilization budget:
737 *
738 * util_avg_cap = (1024 - cfs_rq->avg.util_avg) / 2^n
739 *
740 * where n denotes the nth task.
741 *
742 * For example, a simplest series from the beginning would be like:
743 *
744 * task util_avg: 512, 256, 128, 64, 32, 16, 8, ...
745 * cfs_rq util_avg: 512, 768, 896, 960, 992, 1008, 1016, ...
746 *
747 * Finally, that extrapolated util_avg is clamped to the cap (util_avg_cap)
748 * if util_avg > util_avg_cap.
749 */
750 void post_init_entity_util_avg(struct sched_entity *se)
751 {
752 struct cfs_rq *cfs_rq = cfs_rq_of(se);
753 long cap = (long)(SCHED_CAPACITY_SCALE - cfs_rq->avg.util_avg) / 2;
754
755 if (cap > 0) {
756 struct sched_avg *sa = &se->avg;
757 u64 util_avg = READ_ONCE(sa->util_avg);
758
759 if (cfs_rq->avg.util_avg != 0) {
760 util_avg = cfs_rq->avg.util_avg * se->load.weight;
> 761 util_avg /= (cfs_rq->avg.load_avg + 1);
762 if (util_avg > cap)
763 util_avg = cap;
764 } else {
765 util_avg = cap;
766 }
767
768 WRITE_ONCE(sa->util_avg, util_avg);
769 }
770
771 if (entity_is_task(se)) {
772 struct task_struct *p = task_of(se);
773 if (p->sched_class != &fair_sched_class) {
774 /*
775 * For !fair tasks do:
776 *
777 update_cfs_rq_load_avg(now, cfs_rq);
778 attach_entity_load_avg(cfs_rq, se, 0);
779 switched_from_fair(rq, p);
780 *
781 * such that the next switched_to_fair() has the
782 * expected state.
783 */
784 se->avg.last_update_time = cfs_rq_clock_task(cfs_rq);
785 return;
786 }
787 }
788
789 attach_entity_cfs_rq(se);
790 }
791
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28035 bytes --]
next prev parent reply other threads:[~2018-06-05 1:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 16:05 [PATCH 0/2] Improve estimated utilization of preempted FAIR tasks Patrick Bellasi
2018-06-04 16:05 ` [PATCH 1/2] sched/fair: pelt: use u32 for util_avg Patrick Bellasi
2018-06-05 1:30 ` kbuild test robot
2018-06-05 1:34 ` kbuild test robot [this message]
2018-06-04 16:06 ` [PATCH 2/2] sched/fair: util_est: add running_sum tracking Patrick Bellasi
2018-06-04 17:46 ` Joel Fernandes
2018-06-05 15:21 ` Patrick Bellasi
2018-06-05 19:33 ` Joel Fernandes
2018-06-05 19:43 ` Joel Fernandes
2018-06-05 1:29 ` kbuild test robot
2018-06-05 6:57 ` Vincent Guittot
2018-06-05 15:11 ` Patrick Bellasi
2018-06-05 15:31 ` Juri Lelli
2018-06-05 16:54 ` Patrick Bellasi
2018-06-05 20:46 ` Joel Fernandes
2018-06-05 23:15 ` Saravana Kannan
2018-06-06 8:26 ` Vincent Guittot
2018-06-06 10:38 ` Patrick Bellasi
2018-06-05 10:46 ` kbuild test robot
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=201806050902.GyH994VG%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=joelaf@google.com \
--cc=juri.lelli@redhat.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=patrick.bellasi@arm.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=smuckle@google.com \
--cc=tkjos@google.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@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 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).