[Jack-Devel] jack is broken on ARM without bogomips

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] jack is broken on ARM without bogomips

Grant-4
bogomips was removed from /proc/cpuinfo on ARM:

http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/178645.html

which breaks jackd:

https://github.com/archlinuxarm/PKGBUILDs/issues/601

I tried the latest jack1 and jack2 from git but neither work on ARM
because of this.

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
> bogomips was removed from /proc/cpuinfo on ARM:
>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/178645.html
>
> which breaks jackd:
>
> https://github.com/archlinuxarm/PKGBUILDs/issues/601
>
> I tried the latest jack1 and jack2 from git but neither work on ARM
> because of this.
>
> - Grant

Actually it isn't bogomips missing that's killing this, it's "cpu
Mhz".  Somebody tried to submit a patch to fix it but people didn't
think it should be fixed:

http://www.spinics.net/lists/arm-kernel/msg294090.html

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Florian Paul Schmidt-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 15.01.2014 16:09, Grant wrote:
> Actually it isn't bogomips missing that's killing this, it's "cpu
> Mhz".  Somebody tried to submit a patch to fix it but people
> didn't think it should be fixed:
>
> http://www.spinics.net/lists/arm-kernel/msg294090.html

And the reply hints at using sysfs for that purpose:

http://www.spinics.net/lists/arm-kernel/msg294123.html

If that interface is consistent across architectures then jack might
use it?

Flo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS1sRIAAoJEA5f4Coltk8ZqJ8H/RdTPZBXdCNUmRX2762VAMYi
c26yq4aU1ds64eS8d+98qJueZ8QpdCg86L1u7ioQ0CcYBuJgHyWDwcMo9Ux031sZ
NT45FOE2Po9/LXUK4PfoTUZr6K/RM+4A63gX0XsLBPq5/o3mNhUPJoD4ffHn5Tn3
GxbqLBN6cgyIueCNFBGkoei6OCdXTJVEyL/s5unrDj+ddHyFU5WjBi32pSlAaeWZ
N9yXzzx6K0akqwav7TVznoUrTshD+4ixcLqgMLYKIZaCB9n5Rg3b3ne3s0EkpEDT
9tyhx4cE6H1dxAO9ekaevKxHMQpiFOlD2pMTvUIlBKu36h8EIdyh83h6I1bCR0s=
=SClT
-----END PGP SIGNATURE-----
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>> Actually it isn't bogomips missing that's killing this, it's "cpu
>> Mhz".  Somebody tried to submit a patch to fix it but people
>> didn't think it should be fixed:
>>
>> http://www.spinics.net/lists/arm-kernel/msg294090.html
>
> And the reply hints at using sysfs for that purpose:
>
> http://www.spinics.net/lists/arm-kernel/msg294123.html
>
> If that interface is consistent across architectures then jack might
> use it?

So I'm sure I understand, that would require some changes to the jackd
source code?

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Paul Davis



On Wed, Jan 15, 2014 at 4:06 PM, Grant <[hidden email]> wrote:
>> Actually it isn't bogomips missing that's killing this, it's "cpu
>> Mhz".  Somebody tried to submit a patch to fix it but people
>> didn't think it should be fixed:
>>
>> http://www.spinics.net/lists/arm-kernel/msg294090.html
>
> And the reply hints at using sysfs for that purpose:
>
> http://www.spinics.net/lists/arm-kernel/msg294123.html
>
> If that interface is consistent across architectures then jack might
> use it?

So I'm sure I understand, that would require some changes to the jackd
source code?

yes.
 

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>> >> Actually it isn't bogomips missing that's killing this, it's "cpu
>> >> Mhz".  Somebody tried to submit a patch to fix it but people
>> >> didn't think it should be fixed:
>> >>
>> >> http://www.spinics.net/lists/arm-kernel/msg294090.html
>> >
>> > And the reply hints at using sysfs for that purpose:
>> >
>> > http://www.spinics.net/lists/arm-kernel/msg294123.html
>> >
>> > If that interface is consistent across architectures then jack might
>> > use it?
>>
>> So I'm sure I understand, that would require some changes to the jackd
>> source code?
>
>
> yes.

Should I file a bug?

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Adrian Knoth
On Wed, Jan 15, 2014 at 01:40:46PM -0800, Grant wrote:

> >> > And the reply hints at using sysfs for that purpose:
> >> > http://www.spinics.net/lists/arm-kernel/msg294123.html
> >> > If that interface is consistent across architectures then jack might
> >> > use it?
> >> So I'm sure I understand, that would require some changes to the jackd
> >> source code?
> > yes.
> Should I file a bug?

You should provide a patch. ;)


On a more serious note: does it make sense to rely on the cpu frequency
to relate it to cycles? Especially on ARM, where get_cycles() is just a
wrapper around gettimeofday().

My gut feeling is that we should rely on a proper monotonic clock
instead and drop this /proc/cpuinfo parser altogether.



Cheers

--
mail: [hidden email]   http://adi.thur.de        PGP/GPG: key via keyserver

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Paul Davis



On Wed, Jan 15, 2014 at 5:37 PM, Adrian Knoth <[hidden email]> wrote:

My gut feeling is that we should rely on a proper monotonic clock
instead and drop this /proc/cpuinfo parser altogether.

agreed 100%.
 

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Peter Nelson-4
In reply to this post by Grant-4
On Tue, 2014-01-14 at 17:00 -0800, Grant wrote:

> bogomips was removed from /proc/cpuinfo on ARM:
>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/178645.html
>
> which breaks jackd:
>
> https://github.com/archlinuxarm/PKGBUILDs/issues/601
>
> I tried the latest jack1 and jack2 from git but neither work on ARM
> because of this.
jack1 (at least) can use different clock sources. I'll assume there's no
HPET on ARM but "--clocksource system" should work, I think.

[ --clocksource OR -c [ c(ycle) | h(pet) | s(ystem) ]


--
Peter Nelson <[hidden email]>

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>> bogomips was removed from /proc/cpuinfo on ARM:
>>
>> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-June/178645.html
>>
>> which breaks jackd:
>>
>> https://github.com/archlinuxarm/PKGBUILDs/issues/601
>>
>> I tried the latest jack1 and jack2 from git but neither work on ARM
>> because of this.
>
> jack1 (at least) can use different clock sources. I'll assume there's no
> HPET on ARM but "--clocksource system" should work, I think.
>
> [ --clocksource OR -c [ c(ycle) | h(pet) | s(ystem) ]

I think jackd checks (and fails without) "cpu MHz" regardless of clocksource:

# jackd -d net -cs
jackd 0.124.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben
Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
FATAL: cannot locate cpu MHz in /proc/cpuinfo
#

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Peter Nelson-4
On Fri, 2014-01-17 at 07:22 -0800, Grant wrote:

> I think jackd checks (and fails without) "cpu MHz" regardless of clocksource:
>
> # jackd -d net -cs
> jackd 0.124.0
> Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben
> Hohn and others.
> jackd comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
>
> JACK compiled with System V SHM support.
> FATAL: cannot locate cpu MHz in /proc/cpuinfo
> #
Because -cs is not a backend option. You need to place it before the
first -d parameter, i.e. jackd -cs -d net

--
Peter Nelson <[hidden email]>

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>> I think jackd checks (and fails without) "cpu MHz" regardless of clocksource:
>>
>> # jackd -d net -cs
>> jackd 0.124.0
>> Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben
>> Hohn and others.
>> jackd comes with ABSOLUTELY NO WARRANTY
>> This is free software, and you are welcome to redistribute it
>> under certain conditions; see the file COPYING for details
>>
>> JACK compiled with System V SHM support.
>> FATAL: cannot locate cpu MHz in /proc/cpuinfo
>> #
>
> Because -cs is not a backend option. You need to place it before the
> first -d parameter, i.e. jackd -cs -d net

I get the same unfortunately:

# jackd -cs -d net
jackd 0.121.3
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben
Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details

JACK compiled with System V SHM support.
FATAL: cannot locate cpu MHz in /proc/cpuinfo
#

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Fernando Lopez-Lezcano
In reply to this post by Paul Davis
On 01/15/2014 03:07 PM, Paul Davis wrote:
> On Wed, Jan 15, 2014 at 5:37 PM, Adrian Knoth <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     My gut feeling is that we should rely on a proper monotonic clock
>     instead and drop this /proc/cpuinfo parser altogether.
>
> agreed 100%.

In the meantime... (I'm also seeing this error on newer kernels)

Would it make sense to just hardwire something in there if the existing
tests fail? Is there something that will break if I do that? (I'm going
to test that but I m asking anyway).

-- Fernando
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>>     My gut feeling is that we should rely on a proper monotonic clock
>>     instead and drop this /proc/cpuinfo parser altogether.
>>
>> agreed 100%.
>
>
> In the meantime... (I'm also seeing this error on newer kernels)
>
> Would it make sense to just hardwire something in there if the existing
> tests fail? Is there something that will break if I do that? (I'm going to
> test that but I m asking anyway).

Please share your patch if you get something working.

Thanks,
Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Fernando Lopez-Lezcano
On 01/22/2014 02:37 PM, Grant wrote:

>>>      My gut feeling is that we should rely on a proper monotonic clock
>>>      instead and drop this /proc/cpuinfo parser altogether.
>>>
>>> agreed 100%.
>>
>>
>> In the meantime... (I'm also seeing this error on newer kernels)
>>
>> Would it make sense to just hardwire something in there if the existing
>> tests fail? Is there something that will break if I do that? (I'm going to
>> test that but I m asking anyway).
>
> Please share your patch if you get something working.

Hi Grant,

I just tried a hack. Can't be called a proper patch, I just used 1000MHz
as the frequency - I thought that would work as, after all, the BogoMips
numbers are, well, "bogus" anyway. At least on Pidora with 3.12.x it
seems to start and work. Not much testing but got a sinewave going :-)
Hack below (messages could be nicer, of course)...

It would be nice to have a proper fix.
-- Fernando


--- jack-1.9.9.5/linux/JackLinuxTime.c~ 2012-12-10 01:26:57.000000000 -0800
+++ jack-1.9.9.5/linux/JackLinuxTime.c 2014-01-22 14:39:41.000000000 -0800
@@ -152,7 +152,9 @@
  if (fgets(buf, sizeof(buf), f) == NULL) {
  jack_error ("FATAL: cannot locate cpu MHz in "
     "/proc/cpuinfo\n");
- exit(1);
+ fclose(f);
+ jack_log("Using 1GHz by default");
+ return (jack_time_t)1000;
  }

  #if defined(__powerpc__)
@@ -176,6 +178,10 @@
  {
  fclose(f);
  return (jack_time_t)mhz;
+ } else {
+ fclose(f);
+ jack_log("Using 1GHz by default");
+ return (jack_time_t)1000;
  }
  }
  }
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>>>>      My gut feeling is that we should rely on a proper monotonic clock
>>>>      instead and drop this /proc/cpuinfo parser altogether.
>>>>
>>>> agreed 100%.
>>>
>>> In the meantime... (I'm also seeing this error on newer kernels)
>>>
>>> Would it make sense to just hardwire something in there if the existing
>>> tests fail? Is there something that will break if I do that? (I'm going
>>> to
>>> test that but I m asking anyway).
>>
>> Please share your patch if you get something working.
>
> Hi Grant,
>
> I just tried a hack. Can't be called a proper patch, I just used 1000MHz as
> the frequency - I thought that would work as, after all, the BogoMips
> numbers are, well, "bogus" anyway. At least on Pidora with 3.12.x it seems
> to start and work. Not much testing but got a sinewave going :-) Hack below
> (messages could be nicer, of course)...
>
> It would be nice to have a proper fix.
> -- Fernando
>
> --- jack-1.9.9.5/linux/JackLinuxTime.c~ 2012-12-10 01:26:57.000000000 -0800
> +++ jack-1.9.9.5/linux/JackLinuxTime.c  2014-01-22 14:39:41.000000000 -0800
> @@ -152,7 +152,9 @@
>                 if (fgets(buf, sizeof(buf), f) == NULL) {
>                         jack_error ("FATAL: cannot locate cpu MHz in "
>                                     "/proc/cpuinfo\n");
> -                       exit(1);
> +                       fclose(f);
> +                       jack_log("Using 1GHz by default");
> +                       return (jack_time_t)1000;
>                 }
>
>  #if defined(__powerpc__)
> @@ -176,6 +178,10 @@
>                 {
>                         fclose(f);
>                         return (jack_time_t)mhz;
> +               } else {
> +                       fclose(f);
> +                       jack_log("Using 1GHz by default");
> +                       return (jack_time_t)1000;
>                 }
>         }
>  }

Hi Fernando, I was about to try this but I can't find JackLinuxTime.c
in the latest version from git.  Does anyone know where this code is
now?

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Adrian Knoth
On Wed, Jan 29, 2014 at 11:38:33AM -0800, Grant wrote:

> > Hi Grant,
> >
> > I just tried a hack. Can't be called a proper patch, I just used 1000MHz as
> > the frequency - I thought that would work as, after all, the BogoMips
> > numbers are, well, "bogus" anyway. At least on Pidora with 3.12.x it seems
> > to start and work. Not much testing but got a sinewave going :-) Hack below
> > (messages could be nicer, of course)...
> >
> > It would be nice to have a proper fix.
> > -- Fernando
> >
> > --- jack-1.9.9.5/linux/JackLinuxTime.c~ 2012-12-10 01:26:57.000000000 -0800
> > +++ jack-1.9.9.5/linux/JackLinuxTime.c  2014-01-22 14:39:41.000000000 -0800
> > @@ -152,7 +152,9 @@
> >                 if (fgets(buf, sizeof(buf), f) == NULL) {
> >                         jack_error ("FATAL: cannot locate cpu MHz in "
> >                                     "/proc/cpuinfo\n");
> > -                       exit(1);
> > +                       fclose(f);
> > +                       jack_log("Using 1GHz by default");
> > +                       return (jack_time_t)1000;
> >                 }
> >
> >  #if defined(__powerpc__)
> > @@ -176,6 +178,10 @@
> >                 {
> >                         fclose(f);
> >                         return (jack_time_t)mhz;
> > +               } else {
> > +                       fclose(f);
> > +                       jack_log("Using 1GHz by default");
> > +                       return (jack_time_t)1000;
> >                 }
> >         }
> >  }
>
> Hi Fernando, I was about to try this but I can't find JackLinuxTime.c
> in the latest version from git.  Does anyone know where this code is
> now?

This is jackd2. AFAIK, you're using jackd1, so if you're really
affected, it'd be config/os/gnu-linux/time.c




Cheers

--
mail: [hidden email]   http://adi.thur.de        PGP/GPG: key via keyserver

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: jack is broken on ARM without bogomips

Grant-4
>> > Hi Grant,
>> >
>> > I just tried a hack. Can't be called a proper patch, I just used 1000MHz as
>> > the frequency - I thought that would work as, after all, the BogoMips
>> > numbers are, well, "bogus" anyway. At least on Pidora with 3.12.x it seems
>> > to start and work. Not much testing but got a sinewave going :-) Hack below
>> > (messages could be nicer, of course)...
>> >
>> > It would be nice to have a proper fix.
>> > -- Fernando
>> >
>> > --- jack-1.9.9.5/linux/JackLinuxTime.c~ 2012-12-10 01:26:57.000000000 -0800
>> > +++ jack-1.9.9.5/linux/JackLinuxTime.c  2014-01-22 14:39:41.000000000 -0800
>> > @@ -152,7 +152,9 @@
>> >                 if (fgets(buf, sizeof(buf), f) == NULL) {
>> >                         jack_error ("FATAL: cannot locate cpu MHz in "
>> >                                     "/proc/cpuinfo\n");
>> > -                       exit(1);
>> > +                       fclose(f);
>> > +                       jack_log("Using 1GHz by default");
>> > +                       return (jack_time_t)1000;
>> >                 }
>> >
>> >  #if defined(__powerpc__)
>> > @@ -176,6 +178,10 @@
>> >                 {
>> >                         fclose(f);
>> >                         return (jack_time_t)mhz;
>> > +               } else {
>> > +                       fclose(f);
>> > +                       jack_log("Using 1GHz by default");
>> > +                       return (jack_time_t)1000;
>> >                 }
>> >         }
>> >  }
>>
>> Hi Fernando, I was about to try this but I can't find JackLinuxTime.c
>> in the latest version from git.  Does anyone know where this code is
>> now?
>
> This is jackd2. AFAIK, you're using jackd1, so if you're really
> affected, it'd be config/os/gnu-linux/time.c

I was affected by this on ARM and that patch to time.c (without the
jack_log lines for jack1) worked great.

- Grant
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org