2020-07-29 15:58:24

by Vitaly Chikunov

[permalink] [raw]
Subject: Should perf version match kernel version?

Hi,

It seems that most distros try to have perf version to match with
running kernel version. Is is requirement? Would it be better to have
single perf from kernel mainline to work with any (older) kernel
version?

We have different kernel versions in ALT Linux (stable for 4.19, 5.4,
and 5.7) and I want to understand if we should have three perfs or
single package will be enough.

Thanks,


2020-07-29 16:05:30

by Peter Zijlstra

[permalink] [raw]
Subject: Re: Should perf version match kernel version?

On Wed, Jul 29, 2020 at 06:56:47PM +0300, Vitaly Chikunov wrote:
> Hi,
>
> It seems that most distros try to have perf version to match with
> running kernel version. Is is requirement? Would it be better to have
> single perf from kernel mainline to work with any (older) kernel
> version?
>
> We have different kernel versions in ALT Linux (stable for 4.19, 5.4,
> and 5.7) and I want to understand if we should have three perfs or
> single package will be enough.

We strive to have it all compatible, older perf should work on newer
kernel and newer perf should work on older kernel.

How well it's all tested is another.

Personally I often use a very old perf.

2020-07-29 16:30:24

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: Should perf version match kernel version?



On July 29, 2020 1:02:20 PM GMT-03:00, [email protected] wrote:
>On Wed, Jul 29, 2020 at 06:56:47PM +0300, Vitaly Chikunov wrote:
>> Hi,
>>
>> It seems that most distros try to have perf version to match with
>> running kernel version. Is is requirement? Would it be better to have
>> single perf from kernel mainline to work with any (older) kernel
>> version?
>>
>> We have different kernel versions in ALT Linux (stable for 4.19, 5.4,
>> and 5.7) and I want to understand if we should have three perfs or
>> single package will be enough.
>
>We strive to have it all compatible, older perf should work on newer
>kernel and newer perf should work on older kernel.
>
>How well it's all tested is another.
>
>Personally I often use a very old perf.

Yeah, never was a requirement, if you find some problem using a new perf on an old kernel or the other way around, please report.

- Arnaldo

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

2020-07-29 17:58:05

by Vitaly Chikunov

[permalink] [raw]
Subject: Re: Should perf version match kernel version?

Peter, Arnaldo,

On Wed, Jul 29, 2020 at 01:27:32PM -0300, Arnaldo Carvalho de Melo wrote:
>
>
> On July 29, 2020 1:02:20 PM GMT-03:00, [email protected] wrote:
> >On Wed, Jul 29, 2020 at 06:56:47PM +0300, Vitaly Chikunov wrote:
> >> Hi,
> >>
> >> It seems that most distros try to have perf version to match with
> >> running kernel version. Is is requirement? Would it be better to have
> >> single perf from kernel mainline to work with any (older) kernel
> >> version?
> >>
> >> We have different kernel versions in ALT Linux (stable for 4.19, 5.4,
> >> and 5.7) and I want to understand if we should have three perfs or
> >> single package will be enough.
> >
> >We strive to have it all compatible, older perf should work on newer
> >kernel and newer perf should work on older kernel.
> >
> >How well it's all tested is another.
> >
> >Personally I often use a very old perf.
>
> Yeah, never was a requirement, if you find some problem using a new perf on an old kernel or the other way around, please report.

That's great to know. Thanks for the answers!

2020-07-29 18:29:44

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: Should perf version match kernel version?

Em Wed, Jul 29, 2020 at 08:57:04PM +0300, Vitaly Chikunov escreveu:
> On Wed, Jul 29, 2020 at 01:27:32PM -0300, Arnaldo Carvalho de Melo wrote:
> > On July 29, 2020 1:02:20 PM GMT-03:00, [email protected] wrote:
> > >On Wed, Jul 29, 2020 at 06:56:47PM +0300, Vitaly Chikunov wrote:
> > >> It seems that most distros try to have perf version to match with
> > >> running kernel version. Is is requirement? Would it be better to have
> > >> single perf from kernel mainline to work with any (older) kernel
> > >> version?

> > >> We have different kernel versions in ALT Linux (stable for 4.19, 5.4,
> > >> and 5.7) and I want to understand if we should have three perfs or
> > >> single package will be enough.

> > >We strive to have it all compatible, older perf should work on newer
> > >kernel and newer perf should work on older kernel.

> > >How well it's all tested is another.

> > >Personally I often use a very old perf.

> > Yeah, never was a requirement, if you find some problem using a new perf on an old kernel or the other way around, please report.
>
> That's great to know. Thanks for the answers!

Having said that, from time to time there are new features such as, say
LBR callgraph stitching, there are kernel and tooling components, so its
important to try and have the latest perf, but yeah, as you said, one
perf package is enough, just keep it uptodate :-)

For other features such as the metric work with 'perf stat', its purely
userspace, and sometimes its purely kernel space, no lockstep.

- Arnaldo

2020-08-02 11:52:10

by Pavel Machek

[permalink] [raw]
Subject: Re: Should perf version match kernel version?

Hi!

> > >We strive to have it all compatible, older perf should work on newer
> > >kernel and newer perf should work on older kernel.
> > >
> > >How well it's all tested is another.
> > >
> > >Personally I often use a very old perf.
> >
> > Yeah, never was a requirement, if you find some problem using a new perf on an old kernel or the other way around, please report.
>
> That's great to know. Thanks for the answers!

Someone should tell debian, AFAICT they believe perf version == kernel version is a
requirement...and so says their manpage.

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html