lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190921144423.GA13091@xsang-OptiPlex-9020>
Date:   Sat, 21 Sep 2019 22:44:23 +0800
From:   kbuild test robot <lkp@...el.com>
To:     YT Chang <yt.chang@...iatek.com>
Cc:     kbuild-all@...org, Peter Zijlstra <peterz@...radead.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        wsd_upstream@...iatek.com, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org,
        YT Chang <yt.chang@...iatek.com>
Subject: Re: [PATCH 1/1] sched/eas: introduce system-wide overutil indicator

Hi YT,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3 next-20190918]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/YT-Chang/sched-eas-introduce-system-wide-overutil-indicator/20190919-152213
config: x86_64-randconfig-s1-201937 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   kernel/sched/fair.c: In function 'update_system_overutilized':
>> kernel/sched/fair.c:5234:20: error: 'capacity_margin' undeclared (first use in this function)
          group_util * capacity_margin)) {
                       ^~~~~~~~~~~~~~~
   kernel/sched/fair.c:5234:20: note: each undeclared identifier is reported only once for each function it appears in

# https://github.com/0day-ci/linux/commit/58f2ed2a11501d4de287fafc0a7b3385d54f8238
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 58f2ed2a11501d4de287fafc0a7b3385d54f8238
vim +/capacity_margin +5234 kernel/sched/fair.c

58f2ed2a11501d YT Chang 2019-09-19  5195  
58f2ed2a11501d YT Chang 2019-09-19  5196  static
58f2ed2a11501d YT Chang 2019-09-19  5197  void update_system_overutilized(struct sched_domain *sd, struct cpumask *cpus)
58f2ed2a11501d YT Chang 2019-09-19  5198  {
58f2ed2a11501d YT Chang 2019-09-19  5199  	unsigned long group_util;
58f2ed2a11501d YT Chang 2019-09-19  5200  	bool intra_overutil = false;
58f2ed2a11501d YT Chang 2019-09-19  5201  	unsigned long max_capacity;
58f2ed2a11501d YT Chang 2019-09-19  5202  	struct sched_group *group = sd->groups;
58f2ed2a11501d YT Chang 2019-09-19  5203  	struct root_domain *rd;
58f2ed2a11501d YT Chang 2019-09-19  5204  	int this_cpu;
58f2ed2a11501d YT Chang 2019-09-19  5205  	bool overutilized;
58f2ed2a11501d YT Chang 2019-09-19  5206  	int i;
58f2ed2a11501d YT Chang 2019-09-19  5207  
58f2ed2a11501d YT Chang 2019-09-19  5208  	this_cpu = smp_processor_id();
58f2ed2a11501d YT Chang 2019-09-19  5209  	rd = cpu_rq(this_cpu)->rd;
58f2ed2a11501d YT Chang 2019-09-19  5210  	overutilized = READ_ONCE(rd->overutilized);
58f2ed2a11501d YT Chang 2019-09-19  5211  	max_capacity = rd->max_cpu_capacity;
58f2ed2a11501d YT Chang 2019-09-19  5212  
58f2ed2a11501d YT Chang 2019-09-19  5213  	do {
58f2ed2a11501d YT Chang 2019-09-19  5214  		group_util = 0;
58f2ed2a11501d YT Chang 2019-09-19  5215  		for_each_cpu_and(i, sched_group_span(group), cpus) {
58f2ed2a11501d YT Chang 2019-09-19  5216  			group_util += cpu_util(i);
58f2ed2a11501d YT Chang 2019-09-19  5217  			if (cpu_overutilized(i)) {
58f2ed2a11501d YT Chang 2019-09-19  5218  				if (capacity_orig_of(i) < max_capacity) {
58f2ed2a11501d YT Chang 2019-09-19  5219  					intra_overutil = true;
58f2ed2a11501d YT Chang 2019-09-19  5220  					break;
58f2ed2a11501d YT Chang 2019-09-19  5221  				}
58f2ed2a11501d YT Chang 2019-09-19  5222  			}
58f2ed2a11501d YT Chang 2019-09-19  5223  		}
58f2ed2a11501d YT Chang 2019-09-19  5224  
58f2ed2a11501d YT Chang 2019-09-19  5225  		/*
58f2ed2a11501d YT Chang 2019-09-19  5226  		 * A capacity base hint for over-utilization.
58f2ed2a11501d YT Chang 2019-09-19  5227  		 * Not to trigger system overutiled if heavy tasks
58f2ed2a11501d YT Chang 2019-09-19  5228  		 * in Big.cluster, so
58f2ed2a11501d YT Chang 2019-09-19  5229  		 * add the free room(20%) of Big.cluster is impacted which means
58f2ed2a11501d YT Chang 2019-09-19  5230  		 * system-wide over-utilization,
58f2ed2a11501d YT Chang 2019-09-19  5231  		 * that considers whole cluster not single cpu
58f2ed2a11501d YT Chang 2019-09-19  5232  		 */
58f2ed2a11501d YT Chang 2019-09-19  5233  		if (group->group_weight > 1 && (group->sgc->capacity * 1024 <
58f2ed2a11501d YT Chang 2019-09-19 @5234  						group_util * capacity_margin)) {
58f2ed2a11501d YT Chang 2019-09-19  5235  			intra_overutil = true;
58f2ed2a11501d YT Chang 2019-09-19  5236  			break;
58f2ed2a11501d YT Chang 2019-09-19  5237  		}
58f2ed2a11501d YT Chang 2019-09-19  5238  
58f2ed2a11501d YT Chang 2019-09-19  5239  		group = group->next;
58f2ed2a11501d YT Chang 2019-09-19  5240  
58f2ed2a11501d YT Chang 2019-09-19  5241  	} while (group != sd->groups && !intra_overutil);
58f2ed2a11501d YT Chang 2019-09-19  5242  
58f2ed2a11501d YT Chang 2019-09-19  5243  	if (overutilized != intra_overutil) {
58f2ed2a11501d YT Chang 2019-09-19  5244  		if (intra_overutil == true) {
58f2ed2a11501d YT Chang 2019-09-19  5245  			WRITE_ONCE(rd->overutilized, SG_OVERUTILIZED);
58f2ed2a11501d YT Chang 2019-09-19  5246  			trace_sched_overutilized_tp(rd, SG_OVERUTILIZED);
58f2ed2a11501d YT Chang 2019-09-19  5247  		} else {
58f2ed2a11501d YT Chang 2019-09-19  5248  			WRITE_ONCE(rd->overutilized, 0);
58f2ed2a11501d YT Chang 2019-09-19  5249  			trace_sched_overutilized_tp(rd, 0);
58f2ed2a11501d YT Chang 2019-09-19  5250  		}
58f2ed2a11501d YT Chang 2019-09-19  5251  	}
58f2ed2a11501d YT Chang 2019-09-19  5252  }
58f2ed2a11501d YT Chang 2019-09-19  5253  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (34240 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ