tvjon
Posts: 710
Joined: Mon Jan 07, 2013 9:11 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 1:50 pm

joan wrote:
tvjon wrote:paddr=3f000000, baddr=C0000000
I'm afraid that means there has been another change.

DMA is not working as it used to work.
May be of interest?

http://infocenter.arm.com/help/index.js ... index.html

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5318
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 1:55 pm

jamesh wrote:Ref: Jazelle on Pi1, afaik, this is not enabled, and therefore unused. I think its a licensing issue rather than anything technical, but not sure.
I don't believe there's any licensing issue. I believe a half decent jit outperforms Jazelle, so no one supports Jazelle.

plugwash
Forum Moderator
Forum Moderator
Posts: 3439
Joined: Wed Dec 28, 2011 11:45 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:10 pm

AIUI sun/arm never released the specs for jazelle so no opensource vm can use it. The oracle VM we use on the pi doesn't either.

I think the only things that used it were some old J2ME VMs on phones.

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:30 pm

I am seeing a difference in behaviour of usleep between a B+ and Pi2.

Using a bitscope on non pi host I see 1ms on B+ but around 3ms on Pi2.

This is with a call to usleep(1000).

Has anyone else seen this or have I missed something?

[EDIT] Correction, I see 1ms on B+ and 28ms(!) on Pi2.
Last edited by guzunty on Wed Feb 04, 2015 2:42 pm, edited 1 time in total.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:41 pm

jdb wrote: Single-threaded compute performance for tight loops (i.e. C or assembly routines) would be 1.8-2x faster. Compute performance for stuff with a larger memory footprint (interpreted languages like Java, Javascript, Ruby/Python) will benefit proportionally more due to the L2 cache.

How do you get those numbers? 700MHz vs 900MHz isn't that different. What else would be making single threads go 2x?
Antikythera

User avatar
croston
Posts: 702
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:49 pm

guzunty wrote:I am seeing a difference in behaviour of usleep between a B+ and Pi2.

Using a bitscope on non pi host I see 1ms on B+ but around 3ms on Pi2.

This is with a call to usleep(1000).

Has anyone else seen this or have I missed something?

[EDIT] Correction, I see 1ms on B+ and 28ms(!) on Pi2.
This is the reason I have not released a new RPi.GPIO yet. I've not had time to investigate yet. Has anyone got any ideas?

User avatar
RaTTuS
Posts: 10412
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:52 pm

thread locking via different CPU cores ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:53 pm

So far no one has asked about youtube.
Pis A/B run youtube at one frame every 60 seconds.
How does pi 2 do?
Antikythera

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2074
Joined: Thu Jul 11, 2013 2:37 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:56 pm

solar3000 wrote:
jdb wrote: Single-threaded compute performance for tight loops (i.e. C or assembly routines) would be 1.8-2x faster. Compute performance for stuff with a larger memory footprint (interpreted languages like Java, Javascript, Ruby/Python) will benefit proportionally more due to the L2 cache.

How do you get those numbers? 700MHz vs 900MHz isn't that different. What else would be making single threads go 2x?
The main reason is that Cortex A7s have dual-issue instruction parallelism - Superscalar execution (but still in-order execution). Two instructions can be executed per clock cycle as long as there are no register or load/store dependencies on the preceeding instruction(s). Compilers targeting the core know this and optimise instruction scheduling to a certain extent. This plus the clock speed differential gives you ~2x for single-threaded and tight loops.

There are other things that are "better" - larger TLBs for example.
http://infocenter.arm.com/help/index.js ... diifa.html
vs
http://infocenter.arm.com/help/index.js ... DIJBD.html
Rockets are loud.
https://astro-pi.org

guzunty
Posts: 276
Joined: Mon Jan 14, 2013 10:13 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:58 pm

RaTTuS wrote:thread locking via different CPU cores ?
I didn't start any threads myself. I used Gert and Doms demo program here:

http://elinux.org/RPi_Low-level_peripherals#C_2

to make the measurements.

I just changed the sleep(1) to usleep(1000) and modified for the new peripheral base address.

Of course, something else could be contending for the GPIO or the timer.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2074
Joined: Thu Jul 11, 2013 2:37 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 2:59 pm

guzunty wrote:
RaTTuS wrote:thread locking via different CPU cores ?
I didn't start any threads myself. I used Gert and Doms demo program here:

http://elinux.org/RPi_Low-level_peripherals#C_2

to make the measurements.

I just changed the sleep(1) to usleep(1000) and modified for the new peripheral base address.

Of course, something else could be contending for the GPIO or the timer.
We moved both Pi1 and Pi2 to a 3.18 kernel base. There's nothing telling in the kernel configs between each platform that would result in timer discrepancies.

Can you run the same test on a Pi1 that is fully up to date?
Rockets are loud.
https://astro-pi.org

Leopold
Posts: 5
Joined: Fri Jul 05, 2013 4:07 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:17 pm

What is the meaning of the Revision shown in /proc/cpuinfo? For past models the final four hex digits were the revision number as indicated at http://elinux.org/RPi_HardwareHistory#B ... on_History but for the 2B it seems there is now more to it?

gkreidl
Posts: 6048
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:17 pm

solar3000 wrote:So far no one has asked about youtube.
Pis A/B run youtube at one frame every 60 seconds.
How does pi 2 do?
Run web videos using the GPU (either with epiphany/kweb3 using gstreamer-1.0 or with kweb(3) + omxplayer(GUI)). They will play with full speed (and even full screen with the second solution). That works on all Pis. I don't believe, that the ARM7 can decode them by software alone.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:24 pm

dom wrote:
jamesh wrote:Ref: Jazelle on Pi1, afaik, this is not enabled, and therefore unused. I think its a licensing issue rather than anything technical, but not sure.
I don't believe there's any licensing issue. I believe a half decent jit outperforms Jazelle, so no one supports Jazelle.
Wikipedia wrote:The published specifications are very incomplete, being only sufficient for writing operating system code that can support a JVM that uses Jazelle[citation needed]. The declared intent is that only the JVM software needs to (or is allowed to) depend on the hardware interface details. This tight binding facilitates that the hardware and JVM can evolve together without affecting other software. In effect, this gives ARM Holdings considerable control over which JVMs are able to exploit Jazelle[citation needed]. It also prevents open source JVMs from using Jazelle. These issues do not apply to the ARMv7 ThumbEE environment, the nominal successor to Jazelle DBX.
That is also the answer I received way back in 2012 when I asked about an optimised JVM.
ARM wrote: Jazelle v1 Architecture Reference Manual
This is a placeholder for a restricted document that is not available from this site. Please contact ARM for more information.

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:27 pm

gkreidl wrote:
solar3000 wrote:So far no one has asked about youtube.
Pis A/B run youtube at one frame every 60 seconds.
How does pi 2 do?
Run web videos using the GPU (either with epiphany/kweb3 using gstreamer-1.0 or with kweb(3) + omxplayer(GUI)). They will play with full speed (and even full screen with the second solution). That works on all Pis. I don't believe, that the ARM7 can decode them by software alone.

yes, I've run youtube and youtube-dl.
I meant in a browser without special tools, just flash or html5.
Antikythera

gadgetoid
Posts: 152
Joined: Wed Mar 07, 2012 9:58 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:30 pm

I'm also seeing timing issues on the Pi 2, I've boiled them down to this example which takes 20sec! on a Pi 2

This affects usleep, and subsequently Python's sleep command, which makes code like our Display-o-Tron 3000 examples run in sloooow moootion.

Code: Select all

#include  <unistd.h>

int main()
{
 int x = 0;
 for(x = 0; x < 1000; x++){
   usleep(1000);
 }
}
And when timed:

Code: Select all

[email protected] ~ $ time ./a.out

real    0m20.094s
user    0m0.000s
sys     0m0.020s
Same SD card placed in a +B:

Code: Select all

[email protected] ~ $ time ./a.out

real    0m1.095s
user    0m0.000s
sys     0m0.020s

gadgetoid
Posts: 152
Joined: Wed Mar 07, 2012 9:58 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:34 pm

Leopold wrote:What is the meaning of the Revision shown in /proc/cpuinfo? For past models the final four hex digits were the revision number as indicated at http://elinux.org/RPi_HardwareHistory#B ... on_History but for the 2B it seems there is now more to it?
It's a bitfield that contains more information such as memory amount, processor, Pi model, manufacturer and revision.

I've whipped up a Python module to read it: https://github.com/pimoroni/RPi.version

gkreidl
Posts: 6048
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:35 pm

solar3000 wrote: yes, I've run youtube and youtube-dl.
I meant in a browser without special tools, just flash or html5.
No flash video (except with the help of youtube-dl). HTML5 video should profit from the better CPU (often still a bit shaky in the browser right now), but only in a browser that uses GPU HW acceleration (epiphany/kweb3).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
RaTTuS
Posts: 10412
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 3:41 pm

Leopold wrote:What is the meaning of the Revision shown in /proc/cpuinfo? For past models the final four hex digits were the revision number as indicated at http://elinux.org/RPi_HardwareHistory#B ... on_History but for the 2B it seems there is now more to it?

Code: Select all

32 bits
NEW                   23: will be 1 for the new scheme, 0 for the old scheme
MEMSIZE             20: 0=256M 1=512M 2=1G
MANUFACTURER  16: 0=SONY 1=EGOMAN
PROCESSOR         12: 0=2835 1=2836
TYPE                   04: 0=MODELA 1=MODELB 2=MODELA+ 3=MODELB+ 4=Pi2 MODEL B 5=ALPHA 6=CM
REV                     00: 0=REV0 1=REV1 2=REV2
pi2 = 1<<23 | 2<<20 | 1<<12 | 4<<4 = 0xa01040
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

pi-man-uk
Posts: 62
Joined: Tue May 08, 2012 1:41 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 4:26 pm

Hi, just a question on the upgrade process, I’m planning to transition my main server from a model b to my new pi2 tonight. I’ve just apt-get updated/upgraded and noticed /boot got full up of new kernels etc on the pi1, rebooted it and it came back - so I figure I’m good to go. Sooooo, next step, I plan tonight to shut it down, stick the 4 gig full size SD card in my macbook and use dd to create an image file from it on the mac, then I plan to use dd again to write that image file to a 4 gig class 10 *micro SD* card – stick this in the new pi2, boto and it’s off to the races. Will it work?

DirkS
Posts: 9902
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 4:29 pm

pi-man-uk wrote:Will it work?
Yes, but don't blame me if it doesn't ;)

Ste123
Posts: 19
Joined: Sat Aug 11, 2012 7:10 am

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 4:32 pm

FYI - this may help others.

I had a problem booting with my new Pi2B+. The boot would only go so far before it hung. I had run the update command etc,

I finally worked it out I had to boot into the old B+ and reset the overclocking to Normal using raspi-config. Only after doing this could I boot into the Pi2 (which I then overclocked to 1GHz with no problems)

Running fine now - uptime just over 24 hours so far....:)

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 4:33 pm

gadgetoid wrote: And when timed:

Code: Select all

[email protected] ~ $ time ./a.out

real    0m20.094s
user    0m0.000s
sys     0m0.020s
Same SD card placed in a +B:

Code: Select all

[email protected] ~ $ time ./a.out

real    0m1.095s
user    0m0.000s
sys     0m0.020s
O_O

pi-man-uk
Posts: 62
Joined: Tue May 08, 2012 1:41 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 4:36 pm

DirkS wrote:
pi-man-uk wrote:Will it work?
Yes, but don't blame me if it doesn't ;)
ok thanks, I like your answer, I'll go for it. Then I need to swap out all my other Pi with Pi2! (mostly openelec) now I have found the promised land I can't sleep at night with the old model, need lots of 2amp PSUs and new cases also, as well as microSD cards... oh gawd...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23365
Joined: Sat Jul 30, 2011 7:41 pm

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 04, 2015 4:45 pm

pattagghiu wrote:
gadgetoid wrote: And when timed:

Code: Select all

[email protected] ~ $ time ./a.out

real    0m20.094s
user    0m0.000s
sys     0m0.020s
Same SD card placed in a +B:

Code: Select all

[email protected] ~ $ time ./a.out

real    0m1.095s
user    0m0.000s
sys     0m0.020s
O_O
Did we mention it was faster?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Return to “General discussion”