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

Re: [PATCH] xen/percpu: don't initialize percpu on resume



Hi,

On Thu, Mar 27, 2025 at 10:25 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 27.03.2025 06:22, Mykola Kvach wrote:
> > --- a/xen/common/percpu.c
> > +++ b/xen/common/percpu.c
> > @@ -30,7 +30,12 @@ static int init_percpu_area(unsigned int cpu)
> >      char *p;
> >
> >      if ( __per_cpu_offset[cpu] != INVALID_PERCPU_AREA )
> > -        return park_offline_cpus ? 0 : -EBUSY;
> > +    {
> > +        if ( system_state == SYS_STATE_resume )
> > +            return 0;
> > +        else
> > +            return park_offline_cpus ? 0 : -EBUSY;
> > +    }
>
> Hmm, why not the much simpler
>
>         return park_offline_cpus || system_state == SYS_STATE_resume
>                ? 0
>                : -EBUSY;
>
> Even if not for whatever reason, I'd really like to ask to omit such an
> unnecessary "else".

Done

>
> Preferably with the adjustment (which I'd be happy to make while
> committing) and with the (iirc) previously suggested Fixes: tag:

Done

> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Added

>
> Jan

Best regards,
Mykola



 


Rackspace

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