[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 1/1] xen/time: do not decrease steal time after live migration on xen



Hi Dongli,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on xen-tip/linux-next]
[also build test ERROR on v4.14-rc7 next-20171018]
[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/Dongli-Zhang/xen-time-do-not-decrease-steal-time-after-live-migration-on-xen/20171102-025719
base:   https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

   drivers/xen/time.c: In function 'xen_accumulate_runstate_time':
   drivers/xen/time.c:92:25: error: implicit declaration of function 'kcalloc' 
[-Werror=implicit-function-declaration]
      runstate_time_delta = kcalloc(num_possible_cpus(),
                            ^~~~~~~
   drivers/xen/time.c:92:23: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
      runstate_time_delta = kcalloc(num_possible_cpus(),
                          ^
>> drivers/xen/time.c:102:31: error: implicit declaration of function 
>> 'kmalloc_array' [-Werror=implicit-function-declaration]
       runstate_time_delta[cpu] = kmalloc_array(RUNSTATE_max,
                                  ^~~~~~~~~~~~~
   drivers/xen/time.c:102:29: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
       runstate_time_delta[cpu] = kmalloc_array(RUNSTATE_max,
                                ^
   drivers/xen/time.c:141:5: error: implicit declaration of function 'kfree' 
[-Werror=implicit-function-declaration]
        kfree(runstate_time_delta[cpu]);
        ^~~~~
   cc1: some warnings being treated as errors

vim +/kmalloc_array +102 drivers/xen/time.c

    82  
    83  void xen_accumulate_runstate_time(int action)
    84  {
    85          struct vcpu_runstate_info state;
    86          int cpu, i;
    87  
    88          switch (action) {
    89          case -1: /* backup runstate time before suspend */
    90                  WARN_ON_ONCE(unlikely(runstate_time_delta));
    91  
  > 92                  runstate_time_delta = kcalloc(num_possible_cpus(),
    93                                                    
sizeof(*runstate_time_delta),
    94                                                    GFP_KERNEL);
    95                  if (unlikely(!runstate_time_delta)) {
    96                          pr_alert("%s: failed to allocate 
runstate_time_delta\n",
    97                                          __func__);
    98                          return;
    99                  }
   100  
   101                  for_each_possible_cpu(cpu) {
 > 102                          runstate_time_delta[cpu] = 
 > kmalloc_array(RUNSTATE_max,
   103                                                    
sizeof(**runstate_time_delta),
   104                                                    GFP_KERNEL);
   105                          if (unlikely(!runstate_time_delta[cpu])) {
   106                                  pr_alert("%s: failed to allocate 
runstate_time_delta[%d]\n",
   107                                                  __func__, cpu);
   108                                  action = 0;
   109                                  goto reclaim_mem;
   110                          }
   111  
   112                          xen_get_runstate_snapshot_cpu_delta(&state, 
cpu);
   113                          memcpy(runstate_time_delta[cpu],
   114                                  state.time,
   115                                  RUNSTATE_max * 
sizeof(**runstate_time_delta));
   116                  }
   117                  break;
   118  
   119          case 0: /* backup runstate time after resume */
   120                  if (unlikely(!runstate_time_delta)) {
   121                          pr_alert("%s: cannot accumulate runstate time 
as runstate_time_delta is NULL\n",
   122                                          __func__);
   123                          return;
   124                  }
   125  
   126                  for_each_possible_cpu(cpu) {
   127                          for (i = 0; i < RUNSTATE_max; i++)
   128                                  per_cpu(old_runstate_time, cpu)[i] +=
   129                                                  
runstate_time_delta[cpu][i];
   130                  }
   131                  break;
   132  
   133          default: /* do not accumulate runstate time for checkpointing */
   134                  break;
   135          }
   136  
   137  reclaim_mem:
   138          if (action != -1 && runstate_time_delta) {
   139                  for_each_possible_cpu(cpu) {
   140                          if (likely(runstate_time_delta[cpu]))
   141                                  kfree(runstate_time_delta[cpu]);
   142                  }
   143                  kfree(runstate_time_delta);
   144                  runstate_time_delta = NULL;
   145          }
   146  }
   147  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.