[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 1/3] libxc: do some retries in xc_cpupool_removecpu() for EBUSY case
On Thu, Mar 10, Juergen Gross wrote: > +#define NUM_RMCPU_BUSY_RETRIES 5 > + > int xc_cpupool_removecpu(xc_interface *xch, > uint32_t poolid, > int cpu) > { > + unsigned retries; > + int err; > DECLARE_SYSCTL; > > sysctl.cmd = XEN_SYSCTL_cpupool_op; > sysctl.u.cpupool_op.op = XEN_SYSCTL_CPUPOOL_OP_RMCPU; > sysctl.u.cpupool_op.cpupool_id = poolid; > sysctl.u.cpupool_op.cpu = (cpu < 0) ? XEN_SYSCTL_CPUPOOL_PAR_ANY : cpu; > - return do_sysctl_save(xch, &sysctl); > + for ( retries = 0; retries < NUM_RMCPU_BUSY_RETRIES; retries++ ) { > + err = do_sysctl_save(xch, &sysctl); > + if ( err < 0 && errno == EBUSY ) > + sleep(1); > + else > + break; > + } > + return err; This may fail with gcc-4.8, at least with -Og in 13.1: [ 105s] xc_cpupool.c: In function 'xc_cpupool_removecpu': [ 105s] xc_cpupool.c:168:5: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized] [ 105s] return err; [ 105s] ^ Olaf _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |