lkml.org 
[lkml]   [2018]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] x86/intel_rdt/mba_sc: Add support to dynamically update the memory b/w
Hi Vikas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.16-rc7]
[also build test ERROR on next-20180329]
[cannot apply to tip/x86/core]
[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/Vikas-Shivappa/Memory-b-w-allocation-software-controller/20180331-040536
config: i386-randconfig-a0-201812 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

All errors (new ones prefixed by >>):

arch/x86/kernel/cpu/intel_rdt_monitor.o: In function `__mon_event_count':
>> arch/x86/kernel/cpu/intel_rdt_monitor.c:285: undefined reference to `__udivdi3'

vim +285 arch/x86/kernel/cpu/intel_rdt_monitor.c

edf6fa1c Vikas Shivappa 2017-07-25 227
2bbfc129 Vikas Shivappa 2018-03-29 228 static int __mon_event_count(u32 rmid, struct rmid_read *rr, struct mbm_state **md)
d89b7379 Vikas Shivappa 2017-07-25 229 {
2bbfc129 Vikas Shivappa 2018-03-29 230 struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_L3];
2bbfc129 Vikas Shivappa 2018-03-29 231 u64 chunks, shift, tval, cur_bw = 0;
2bbfc129 Vikas Shivappa 2018-03-29 232 unsigned long delta_time, now;
9f52425b Tony Luck 2017-07-25 233 struct mbm_state *m;
d89b7379 Vikas Shivappa 2017-07-25 234
d89b7379 Vikas Shivappa 2017-07-25 235 tval = __rmid_read(rmid, rr->evtid);
d89b7379 Vikas Shivappa 2017-07-25 236 if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) {
d89b7379 Vikas Shivappa 2017-07-25 237 rr->val = tval;
d89b7379 Vikas Shivappa 2017-07-25 238 return -EINVAL;
d89b7379 Vikas Shivappa 2017-07-25 239 }
d89b7379 Vikas Shivappa 2017-07-25 240 switch (rr->evtid) {
d89b7379 Vikas Shivappa 2017-07-25 241 case QOS_L3_OCCUP_EVENT_ID:
d89b7379 Vikas Shivappa 2017-07-25 242 rr->val += tval;
d89b7379 Vikas Shivappa 2017-07-25 243 return 0;
9f52425b Tony Luck 2017-07-25 244 case QOS_L3_MBM_TOTAL_EVENT_ID:
9f52425b Tony Luck 2017-07-25 245 m = &rr->d->mbm_total[rmid];
9f52425b Tony Luck 2017-07-25 246 break;
9f52425b Tony Luck 2017-07-25 247 case QOS_L3_MBM_LOCAL_EVENT_ID:
9f52425b Tony Luck 2017-07-25 248 m = &rr->d->mbm_local[rmid];
9f52425b Tony Luck 2017-07-25 249 break;
d89b7379 Vikas Shivappa 2017-07-25 250 default:
d89b7379 Vikas Shivappa 2017-07-25 251 /*
d89b7379 Vikas Shivappa 2017-07-25 252 * Code would never reach here because
d89b7379 Vikas Shivappa 2017-07-25 253 * an invalid event id would fail the __rmid_read.
d89b7379 Vikas Shivappa 2017-07-25 254 */
d89b7379 Vikas Shivappa 2017-07-25 255 return -EINVAL;
d89b7379 Vikas Shivappa 2017-07-25 256 }
a4de1dfd Vikas Shivappa 2017-07-25 257
a4de1dfd Vikas Shivappa 2017-07-25 258 if (rr->first) {
a4de1dfd Vikas Shivappa 2017-07-25 259 m->prev_msr = tval;
a4de1dfd Vikas Shivappa 2017-07-25 260 m->chunks = 0;
2bbfc129 Vikas Shivappa 2018-03-29 261 m->prev_read_time = jiffies;
2bbfc129 Vikas Shivappa 2018-03-29 262 m->prev_bw = 0;
2bbfc129 Vikas Shivappa 2018-03-29 263 m->delta_bw = MBA_BW_MB_THRSHL;
a4de1dfd Vikas Shivappa 2017-07-25 264 return 0;
a4de1dfd Vikas Shivappa 2017-07-25 265 }
a4de1dfd Vikas Shivappa 2017-07-25 266
9f52425b Tony Luck 2017-07-25 267 shift = 64 - MBM_CNTR_WIDTH;
9f52425b Tony Luck 2017-07-25 268 chunks = (tval << shift) - (m->prev_msr << shift);
9f52425b Tony Luck 2017-07-25 269 chunks >>= shift;
9f52425b Tony Luck 2017-07-25 270 m->chunks += chunks;
9f52425b Tony Luck 2017-07-25 271 m->prev_msr = tval;
9f52425b Tony Luck 2017-07-25 272
9f52425b Tony Luck 2017-07-25 273 rr->val += m->chunks;
2bbfc129 Vikas Shivappa 2018-03-29 274
6138a999 Vikas Shivappa 2018-03-29 275 /*
6138a999 Vikas Shivappa 2018-03-29 276 * We only do the bw calculations for the mbm overflow
6138a999 Vikas Shivappa 2018-03-29 277 * periodic timer calls and for local events only.
6138a999 Vikas Shivappa 2018-03-29 278 */
2bbfc129 Vikas Shivappa 2018-03-29 279 if(!md)
2bbfc129 Vikas Shivappa 2018-03-29 280 goto out;
2bbfc129 Vikas Shivappa 2018-03-29 281
2bbfc129 Vikas Shivappa 2018-03-29 282 now = jiffies;
2bbfc129 Vikas Shivappa 2018-03-29 283 delta_time = jiffies_to_usecs(now - m->prev_read_time);
2bbfc129 Vikas Shivappa 2018-03-29 284 if (delta_time)
2bbfc129 Vikas Shivappa 2018-03-29 @285 cur_bw = (chunks * r->mon_scale) / delta_time;
2bbfc129 Vikas Shivappa 2018-03-29 286
2bbfc129 Vikas Shivappa 2018-03-29 287 if (m->thrshl_calib)
2bbfc129 Vikas Shivappa 2018-03-29 288 m->delta_bw = abs(cur_bw - m->prev_bw);
2bbfc129 Vikas Shivappa 2018-03-29 289 m->thrshl_calib = false;
2bbfc129 Vikas Shivappa 2018-03-29 290 m->prev_bw = cur_bw;
2bbfc129 Vikas Shivappa 2018-03-29 291 m->prev_read_time = now;
2bbfc129 Vikas Shivappa 2018-03-29 292
2bbfc129 Vikas Shivappa 2018-03-29 293 *md = m;
2bbfc129 Vikas Shivappa 2018-03-29 294 out:
2bbfc129 Vikas Shivappa 2018-03-29 295
9f52425b Tony Luck 2017-07-25 296 return 0;
d89b7379 Vikas Shivappa 2017-07-25 297 }
d89b7379 Vikas Shivappa 2017-07-25 298

:::::: The code at line 285 was first introduced by commit
:::::: 2bbfc12978bb70164a0fa01307798973a4e2c80d x86/intel_rdt/mba_sc: Add counting for MBA software controller

:::::: TO: Vikas Shivappa <vikas.shivappa@linux.intel.com>
:::::: CC: 0day robot <fengguang.wu@intel.com>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2018-03-30 23:22    [W:0.252 / U:2.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site