2018-01-23 03:08:45

by Andy Lutomirski

[permalink] [raw]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

On Mon, Jan 22, 2018 at 6:59 PM, Zhang, Ning A <[email protected]> wrote:
> hello, Greg, Andy, Thomas
>
> would you like to backport these two patches to LTS kernel?
>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=1c52d859cb2d417e7216d3e56bb7fea88444cec9
>
> x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit kernels
>
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=c198b121b1a1d7a7171770c634cd49191bac4477
>
> x86/asm: Rewrite sync_core() to use IRET-to-self
>

I'd be in favor of backporting
1c52d859cb2d417e7216d3e56bb7fea88444cec9. I see no compelling reason
to backport the other one, since it doesn't fix a bug. Greg, can you
do this?


2018-01-23 07:26:27

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

On Mon, Jan 22, 2018 at 07:06:29PM -0800, Andy Lutomirski wrote:
> On Mon, Jan 22, 2018 at 6:59 PM, Zhang, Ning A <[email protected]> wrote:
> > hello, Greg, Andy, Thomas
> >
> > would you like to backport these two patches to LTS kernel?
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=1c52d859cb2d417e7216d3e56bb7fea88444cec9
> >
> > x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit kernels
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=c198b121b1a1d7a7171770c634cd49191bac4477
> >
> > x86/asm: Rewrite sync_core() to use IRET-to-self
> >
>
> I'd be in favor of backporting
> 1c52d859cb2d417e7216d3e56bb7fea88444cec9. I see no compelling reason
> to backport the other one, since it doesn't fix a bug. Greg, can you
> do this?

I'll work on this after this round of stable kernels are released.

thanks,

greg k-h

2018-01-24 08:20:45

by Zhang, Ning A

[permalink] [raw]
Subject: RE: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

Thanks Greg, Andy

How about c198b121b1a1d7a7171770c634cd49191bac4477?
Will both patches go to stable kernel?

BR.
Ning.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, January 23, 2018 3:26 PM
To: Andy Lutomirski <[email protected]>
Cc: Zhang, Ning A <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

On Mon, Jan 22, 2018 at 07:06:29PM -0800, Andy Lutomirski wrote:
> On Mon, Jan 22, 2018 at 6:59 PM, Zhang, Ning A <[email protected]> wrote:
> > hello, Greg, Andy, Thomas
> >
> > would you like to backport these two patches to LTS kernel?
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.
> > git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=1c52d859cb
> > 2d417e7216d3e56bb7fea88444cec9
> >
> > x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit
> > kernels
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.
> > git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=c198b121b1
> > a1d7a7171770c634cd49191bac4477
> >
> > x86/asm: Rewrite sync_core() to use IRET-to-self
> >
>
> I'd be in favor of backporting
> 1c52d859cb2d417e7216d3e56bb7fea88444cec9. I see no compelling reason
> to backport the other one, since it doesn't fix a bug. Greg, can you
> do this?

I'll work on this after this round of stable kernels are released.

thanks,

greg k-h

2018-01-24 09:01:23

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

On Tue, Jan 23, 2018 at 08:25:33AM +0100, [email protected] wrote:
> On Mon, Jan 22, 2018 at 07:06:29PM -0800, Andy Lutomirski wrote:
> > On Mon, Jan 22, 2018 at 6:59 PM, Zhang, Ning A <[email protected]> wrote:
> > > hello, Greg, Andy, Thomas
> > >
> > > would you like to backport these two patches to LTS kernel?
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=1c52d859cb2d417e7216d3e56bb7fea88444cec9
> > >
> > > x86/asm/32: Make sync_core() handle missing CPUID on all 32-bit kernels
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/arch/x86/include/asm/processor.h?h=v4.14.14&id=c198b121b1a1d7a7171770c634cd49191bac4477
> > >
> > > x86/asm: Rewrite sync_core() to use IRET-to-self
> > >
> >
> > I'd be in favor of backporting
> > 1c52d859cb2d417e7216d3e56bb7fea88444cec9. I see no compelling reason
> > to backport the other one, since it doesn't fix a bug. Greg, can you
> > do this?
>
> I'll work on this after this round of stable kernels are released.

Now applied, thanks.

greg k-h

2018-01-24 09:01:56

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

On Wed, Jan 24, 2018 at 08:19:44AM +0000, Zhang, Ning A wrote:
> Thanks Greg, Andy
>
> How about c198b121b1a1d7a7171770c634cd49191bac4477?

Why do you think that is needed in the older stable kernels? What
problem does it solve? Do any distros have this patch in their kernels?

thanks,

greg k-h

2018-01-25 02:23:41

by Zhang, Ning A

[permalink] [raw]
Subject: RE: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

When Linux runs as a guest OS, CPUID is privileged instruction, sync_core() will be very slow.

If apply this patch, 200ms will be saved for kernel initial, when Linux runs as a guest OS.

BR.
Ning.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, January 24, 2018 5:01 PM
To: Zhang, Ning A <[email protected]>
Cc: Andy Lutomirski <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?

On Wed, Jan 24, 2018 at 08:19:44AM +0000, Zhang, Ning A wrote:
> Thanks Greg, Andy
>
> How about c198b121b1a1d7a7171770c634cd49191bac4477?

Why do you think that is needed in the older stable kernels? What problem does it solve? Do any distros have this patch in their kernels?

thanks,

greg k-h

2018-01-25 06:51:42

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: backport Rewrite sync_core() to use IRET-to-self to stable kernels?


A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Thu, Jan 25, 2018 at 02:22:57AM +0000, Zhang, Ning A wrote:
> When Linux runs as a guest OS, CPUID is privileged instruction, sync_core() will be very slow.
>
> If apply this patch, 200ms will be saved for kernel initial, when Linux runs as a guest OS.

That's not a regression. Why not just use a newer kernel release if you
want to get the feature of "faster boot"? :)

thanks,

greg k-h