{"id":2842,"date":"2012-08-27T08:00:57","date_gmt":"2012-08-27T07:00:57","guid":{"rendered":"http:\/\/www.blaess.fr\/christophe\/?p=2842"},"modified":"2024-08-07T21:31:31","modified_gmt":"2024-08-07T20:31:31","slug":"xenomai-sur-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.blaess.fr\/christophe\/2012\/08\/27\/xenomai-sur-raspberry-pi\/","title":{"rendered":"Xenomai sur Raspberry Pi"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"http:\/\/www.blaess.fr\/christophe\/2012\/08\/27\/xenomai-sur-raspberry-pi\/\" rel=\"attachment wp-att-2857\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-2857\" title=\"Xenomai sur Raspberry-Pi\" src=\"http:\/\/www.blaess.fr\/christophe\/wp-content\/uploads\/2012\/08\/Xenomai-Raspberry-Pi.png\" alt=\"Xenomai sur Raspberry-Pi\" width=\"211\" height=\"150\" \/><\/a>Depuis l&rsquo;arriv\u00e9e du Raspberry Pi, j&rsquo;ai eu envie d&rsquo;installer Xenomai dessus pour me faire une id\u00e9e de ses capacit\u00e9s dans le domaine\u00a0 temps r\u00e9el. J&rsquo;ai trouv\u00e9 enfin le temps de m&rsquo;en occuper&nbsp;; voici un petit compte-rendu de l&rsquo;installation.<\/p>\n<p style=\"text-align: justify;\">\n<!--more-->\n<\/p>\n<h1>R\u00e9cup\u00e9ration des sources<\/h1>\n<p style=\"text-align: justify;\">Le noyau Linux vanilla ne contient pas encore les drivers pour le Rapsberrry Pi. Ils sont inclus dans les sources propos\u00e9es sur le serveur officiel de la <a title=\"http:\/\/www.raspberrypi.org\/\" href=\"http:\/\/www.raspberrypi.org\/\" target=\"_blank\" rel=\"noopener\">Rapsberry Pi Foundation<\/a>, mais \u00e9galement dans <a title=\"https:\/\/github.com\/bootc\/linux\" href=\"https:\/\/github.com\/bootc\/linux\" target=\"_blank\" rel=\"noopener\">la branche<\/a> maintenue par <em>Chris Boot<\/em>. L&rsquo;avantage de cette derni\u00e8re est de proposer des versions du kernel plus r\u00e9centes.<\/p>\n<p style=\"text-align: justify;\">Le patch Adeos que Xenomai int\u00e8gre dans le noyau Linux est adapt\u00e9 \u00e0 une version bien particuli\u00e8re de ce dernier. T\u00e9l\u00e9chargeons la derni\u00e8re version de Xenomai et v\u00e9rifions le niveau du patch pour processeur Arm.<\/p>\n<pre>[Projets]$ <strong>mkdir XenoPi<\/strong>\n[Projets] <strong>cd XenoPi<\/strong>\n[XenoPi]$ <strong>wget http:\/\/download.gna.org\/xenomai\/stable\/xenomai-2.6.1.tar.bz2<\/strong>\n[...]\n2012-08-20 16:41:09 (1,58 MB\/s) - \u00abxenomai-2.6.1.tar.bz2\u00bb sauvegard\u00e9 [22065780\/22065780]\n[XenoPi]$ <strong>tar xjf xenomai-2.6.1.tar.bz2<\/strong>\n[XenoPi]$ <strong>ls xenomai-2.6.1\/ksrc\/arch\/arm\/patches\/<\/strong>\nadeos-ipipe-2.6.38.8-arm-1.18-08.patch  adeos-ipipe-3.0.36-arm-1.18-11.patch  ipipe-core-3.2.21-arm-1.patch  mxc  README\n[XenoPi]$<\/pre>\n<p style=\"text-align: justify;\">Le patch le plus r\u00e9cent est pour un noyau 3.2.21. Par chance, cette version est disponible dans la branche de Chris Boot.<\/p>\n<pre>[XenoPi]$ <strong>git clone git:\/\/github.com\/bootc\/linux linux-rpi<\/strong>\nCloning into 'linux-rpi'...\n[...]\nResolving deltas: 100% (2109352\/2109352), done.\n[XenoPi]$ <strong>cd linux-rpi\/<\/strong>\n[linux-rpi]$ <strong>git checkout rpi-3.2.21<\/strong>\nChecking out files: 100% (16894\/16894), done.\nBranch rpi-3.2.21 set up to track remote branch rpi-3.2.21 from origin.\nSwitched to a new branch 'rpi-3.2.21'\n[linux-rpi]$ <strong>cd ..<\/strong>\n[XenoPi]$<\/pre>\n<h1>Pr\u00e9paration du noyau<\/h1>\n<p style=\"text-align: justify;\">Tout d&rsquo;abord, appliquons le patch de Xenomai sur le noyau Linux 3.2.21<\/p>\n<pre>[XenoPi]$ <strong>xenomai-2.6.1\/scripts\/prepare-kernel.sh --arch=arm --linux=linux-rpi\/ --adeos=xenomai-2.6.1\/ksrc\/arch\/arm\/patches\/ipipe-core-3.2.21-arm-1.patch<\/strong>\npatching file arch\/arm\/Kconfig\n[...]\npatching file mm\/mprotect.c\npatching file mm\/vmalloc.c\n[XenoPi]$<\/pre>\n<p style=\"text-align: justify;\">Nous devons \u00e0 pr\u00e9sent appliquer un petit patch sp\u00e9cifique au Raspberry Pi. J&rsquo;en ignorais l&rsquo;origine, mais Gilles Chanteperdrix l&rsquo;a indiqu\u00e9e en commentaire de cet article. Il s&rsquo;agit d&rsquo;un patch initialement post\u00e9 par Ian-Cim sur le forum <a title=\"http:\/\/www.raspberrypi.org\/\" href=\"http:\/\/www.raspberrypi.org\" target=\"_blank\" rel=\"noopener\">RaspberryPi.Org<\/a>.<\/p>\n<pre>[XenoPi]$ <strong>wget <a title=\"http:\/\/www.blaess.fr\/christophe\/files\/article-2012-08-27\/rpi-linux-3.2.21-xenomai-2.6.1.patch\" href=\"http:\/\/www.blaess.fr\/christophe\/files\/article-2012-08-27\/rpi-linux-3.2.21-xenomai-2.6.1.patch\" target=\"_blank\" rel=\"noopener\">http:\/\/www.blaess.fr\/christophe\/files\/article-2012-08-27\/rpi-linux-3.2.21-xenomai-2.6.1.patch<\/a><\/strong>\n[XenoPi]$ <strong>cd linux-rpi\/<\/strong>\n[linux-rpi]$ <strong>patch -p1 &lt; ..\/rpi-linux-3.2.21-xenomai-2.6.1.patch<\/strong>\npatching file arch\/arm\/Kconfig\npatching file arch\/arm\/mach-bcm2708\/bcm2708.c\n[linux-rpi]$<\/pre>\n<p style=\"text-align: justify;\">Puis l&rsquo;on pr\u00e9parer la compilation comme d&rsquo;habitude apr\u00e8s avoir t\u00e9l\u00e9charg\u00e9 un fichier de configuration.<\/p>\n<pre>[linux-rpi]$ <strong>wget <a title=\"http:\/\/www.blaess.fr\/christophe\/files\/article-2012-08-27\/config-linux-3.2.21-xenomaii\" href=\"http:\/\/www.blaess.fr\/christophe\/files\/article-2012-08-27\/config-linux-3.2.21-xenomai\" target=\"_blank\" rel=\"noopener\">http:\/\/www.blaess.fr\/christophe\/files\/article-2012-08-27\/config-linux-3.2.21-xenomai<\/a><\/strong>\n[linux-rpi]$ <strong>cp config-linux-3.2.21-xenomai .config<\/strong>\n[linux-rpi]$ <strong>make ARCH=arm menuconfig<\/strong>\n[...]\n[linux-rpi]$<\/pre>\n<h1>Compilation et installation du noyau<\/h1>\n<p style=\"text-align: justify;\">Pour la compilation, j&rsquo;ai pr\u00e9par\u00e9 une cross-toolchain avec Buildroot. Elle se trouve sur ma machine dans <code>\/usr\/local\/cross-rpi\/<\/code>. En outre, j&rsquo;ai ins\u00e9r\u00e9 la carte SD qui sert de m\u00e9moire de masse au Raspberry Pi dans mon poste de d\u00e9veloppement. Elle dispose de deux partitions qui sont visibles dans <code>\/media\/Boot<\/code> (le bootloader et l&rsquo;image du kernel) et <code>\/media\/Root<\/code> (l&rsquo;arborescence des fichiers).<\/p>\n<pre>[linux-rpi]$ <strong>make ARCH=arm CROSS_COMPILE=\/usr\/local\/cross-rpi\/usr\/bin\/arm-linux-<\/strong>\n[...]\n[linux-rpi]$ <strong>cp arch\/arm\/boot\/zImage \/media\/Boot\/kernel.img<\/strong>\n[linux-rpi]$ <strong>sudo make ARCH=arm INSTALL_MOD_PATH=\/media\/Root modules_install<\/strong>\n[...]\n[linux-rpi]$ <strong>cd ..<\/strong>\n[XenoPi]$<\/pre>\n<h1>Boot du kernel<\/h1>\n<p style=\"text-align: justify;\">Apr\u00e8s avoir d\u00e9marr\u00e9 mon Raspberry Pi, sur lequel j&rsquo;ai install\u00e9 un petit syst\u00e8me minimal, je me connecte par SSH.<\/p>\n<pre>[XenoPi]$ <strong>ssh root@192.168.5.152<\/strong>\nroot@192.168.5.152's password:\n~ # <strong>uname -a<\/strong>\nLinux (none) 3.2.21-xenomai+ #1 PREEMPT Mon Aug 20 09:26:26 CEST 2012 armv6l GNU\/Linux\n~ # <strong>cd \/proc\/xenomai\/<\/strong>\n\/proc\/xenomai # ls\nacct          heap          latency       sched         timebases     version\napc           interfaces    registry      schedclasses  timer\nfaults        irq           rtdm          stat          timerstat\n\/proc\/xenomai # <strong>cat version <\/strong>\n2.6.1\n\/proc\/xenomai #<\/pre>\n<p style=\"text-align: justify;\">Notre noyau est bien install\u00e9 et le syst\u00e8me Xenomai y est pr\u00e9sent. V\u00e9rifions quelques param\u00e8tres.<\/p>\n<pre>\/proc\/xenomai # <strong>cat stat<\/strong> \nCPU  PID    MSW        CSW        PF    STAT       %CPU  NAME\n  0  0      0          0          0     00500080  100.0  ROOT\n  0  0      0          1296       0     00000000    0.0  IRQ3: [timer]\n\/proc\/xenomai # <strong>cat sched<\/strong>\nCPU  PID    CLASS  PRI      TIMEOUT   TIMEBASE   STAT       NAME\n  0  0      idle    -1      -         master     R          ROOT\n\/proc\/xenomai # <strong>cat irq<\/strong> \nIRQ         CPU0\n  3:        1031         [timer]\n259:           0         [virtual]\n\/proc\/xenomai # <strong>cat latency<\/strong> \n9000\n\/proc\/xenomai #<\/pre>\n<p>La latence minimale par d\u00e9faut (entre l&rsquo;arriv\u00e9e d&rsquo;une interruption et la prise en charge par son handler) est de 9 microsecondes, ce qui me para\u00eet a priori un peu \u00e9lev\u00e9.<\/p>\n<h1>Compilation et installation de Xenomai<\/h1>\n<p style=\"text-align: justify;\">La compilation des biblioth\u00e8ques de Xenomai se fait de mani\u00e8re traditionnelle, sur le PC de d\u00e9veloppement.<\/p>\n<pre>[XenoPi]$ <strong>cd xenomai-2.6.1\/<\/strong>\n[xenomai-2.6.1]$ <strong>PATH=$PATH:\/usr\/local\/cross-rpi\/usr\/bin\/<\/strong>\n[xenomai-2.6.1]$ <strong>.\/configure --host=arm-linux CFLAGS='-march=armv6' LDFLAGS='-march=armv6'<\/strong>\nconfigure: WARNING: if you wanted to set the --build type, don't use --host.\n    If a cross compiler is detected then cross compile mode will be used\nchecking build system type... i686-pc-linux-gnu\n[...]\nconfig.status: linking .\/include\/asm-generic to src\/include\/asm-generic\/xenomai\nconfig.status: executing depfiles commands\nconfig.status: executing libtool commands\n[xenomai-2.6.1]$ <strong>make<\/strong>\n[...]\n[xenomai-2.6.1]$ <strong>make DESTDIR=$(pwd)\/rpi install<\/strong>\n[xenomai-2.6.1]$ <strong>cd rpi<\/strong>\n[rpi]$ <strong>tar cf xenomai.tar usr\/xenomai\/bin\/ usr\/xenomai\/lib\/ usr\/xenomai\/sbin\/<\/strong><\/pre>\n<p style=\"text-align: justify;\">Je transf\u00e8re alors l&rsquo;archive contenant les biblioth\u00e8ques et les ex\u00e9cutables de test sur le Raspberry Pi.<\/p>\n<pre>[rpi]$ <strong>scp xenomai.tar root@192.168.5.152:\/root<\/strong>\nroot@192.168.5.152's password:\nxenomai.tar                           100% 1290KB   1.3MB\/s   00:00\n[rpi]$<\/pre>\n<p style=\"text-align: justify;\">Puis je me re-connecte sur le Raspberry Pi et je d\u00e9ploie l&rsquo;archive.<\/p>\n<pre>[XenoPi]$ <strong>ssh root@192.168.5.152<\/strong>\nroot@192.168.5.152's password:\n~ # <strong>cd \/<\/strong>\n\/ # <strong>tar xf \/root\/xenomai.tar<\/strong>\n\/ # <strong>ls usr\/xenomai\/bin\/<\/strong>\narith                  insn_read              switchtest\ncheck-vdso             insn_write             wakeup-time\nclocktest              irqloop                wf_generate\ncmd_bits               klatency               wrap-link.sh\ncmd_read               latency                xeno\ncmd_write              mutex-torture-native   xeno-config\ncond-torture-native    mutex-torture-posix    xeno-regression-test\ncond-torture-posix     regression             xeno-test\ncyclictest             rtcanrecv              xeno-test-run\ndohell                 rtcansend              xeno-test-run-wrapper\ninsn_bits              rtdm\n\/ #<\/pre>\n<h1>Test d&rsquo;installation<\/h1>\n<p style=\"text-align: justify;\">Pour tester rapidement le fonctionnement Xenomai, il est habituel de lancer l&rsquo;outil <code>latency<\/code> visible ci-dessus.<\/p>\n<pre>\/ # <strong>cd \/usr\/xenomai\/bin<\/strong>\n\/usr\/xenomai\/bin # <strong>.\/latency -p 100<\/strong>\n== Sampling period: 100 us\n== Test mode: periodic user-mode task\n== All results in microseconds\nwarming up...\nRTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)\nRTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst\nRTD|     -4.000|     -2.000|      8.000|       0|     0|     -4.000|      8.000\nRTD|     -4.000|     -2.000|     13.000|       0|     0|     -4.000|     13.000\nRTD|     -5.000|     -2.000|     15.000|       0|     0|     -5.000|     15.000\nRTD|     -5.000|     -2.000|     10.000|       0|     0|     -5.000|     15.000\nRTD|     -5.000|     -2.000|     16.000|       0|     0|     -5.000|     16.000\nRTD|     -5.000|     -2.000|      9.000|       0|     0|     -5.000|     16.000\nRTD|     -4.000|     -2.000|      9.000|       0|     0|     -5.000|     16.000\nRTD|     -5.000|     -2.000|      8.000|       0|     0|     -5.000|     16.000\nRTD|     -5.000|     -2.000|      8.000|       0|     0|     -5.000|     16.000\nRTD|     -4.000|     -2.000|     19.000|       0|     0|     -5.000|     19.000\nRTD|     -4.000|     -2.000|     11.000|       0|     0|     -5.000|     19.000\nRTD|     -4.000|     -2.000|     12.000|       0|     0|     -5.000|     19.000\nRTD|     -5.000|     -2.000|     11.000|       0|     0|     -5.000|     19.000\nRTD|     -5.000|     -2.000|     11.000|       0|     0|     -5.000|     19.000\nRTD|     -5.000|     -2.000|     11.000|       0|     0|     -5.000|     19.000\nRTD|     -5.000|     -2.000|     12.000|       0|     0|     -5.000|     19.000\nRTD|     -4.000|     -2.000|     11.000|       0|     0|     -5.000|     19.000\nRTD|     -5.000|     -2.000|     12.000|       0|     0|     -5.000|     19.000\nRTD|     -5.000|     -2.000|      8.000|       0|     0|     -5.000|     19.000\nRTD|     -4.000|     -2.000|      8.000|       0|     0|     -5.000|     19.000\nRTD|     -4.000|     -2.000|      8.000|       0|     0|     -5.000|     19.000\nRTT|  00:00:22  (periodic user-mode task, 100 us period, priority 99)\nRTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst\nRTD|     -5.000|     -1.000|      8.000|       0|     0|     -5.000|     19.000\n<strong>(<em>Contr\u00f4le-C<\/em>)<\/strong>\n---|-----------|-----------|-----------|--------|------|-------------------------\nRTS|     -5.000|     -1.000|     19.000|       0|     0|    00:00:23\/00:00:23\n\/usr\/xenomai\/bin #<\/pre>\n<p style=\"text-align: justify;\">Nous voyons appara\u00eetre des latences n\u00e9gatives, ce qui est signe d&rsquo;une mauvaise configuration de la latence minimale (voir <a title=\"Les latences de Xenomai\" href=\"http:\/\/www.blaess.fr\/christophe\/2012\/07\/23\/les-latences-de-xenomai\/\">cet article<\/a> pour plus de d\u00e9tails). Cherchons la v\u00e9ritable valeur.<\/p>\n<pre>\/usr\/xenomai\/bin # <strong>echo 0 &gt; \/proc\/xenomai\/latency<\/strong>\n\/usr\/xenomai\/bin # <strong>.\/latency -p 100<\/strong>\n== Sampling period: 100 us\n== Test mode: periodic user-mode task\n== All results in microseconds\nwarming up...\nRTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)\nRTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst\nRTD|      5.000|      6.000|     17.000|       0|     0|      5.000|     17.000\nRTD|      4.000|      6.000|     17.000|       0|     0|      4.000|     17.000\nRTD|      5.000|      7.000|     17.000|       0|     0|      4.000|     17.000\nRTD|      5.000|      7.000|     20.000|       0|     0|      4.000|     20.000\nRTD|      5.000|      7.000|     20.000|       0|     0|      4.000|     20.000\nRTD|      4.000|      6.000|     17.000|       0|     0|      4.000|     20.000\nRTD|      4.000|      6.000|     18.000|       0|     0|      4.000|     20.000\nRTD|      4.000|      6.000|     17.000|       0|     0|      4.000|     20.000\n[...]\nRTD|      4.000|      6.000|     18.000|       0|     0|      3.000|     33.000\nRTD|      5.000|      6.000|     19.000|       0|     0|      3.000|     33.000\nRTD|      5.000|      6.000|     19.000|       0|     0|      3.000|     33.000\nRTD|      4.000|      6.000|     17.000|       0|     0|      3.000|     33.000\nRTD|      4.000|      6.000|     18.000|       0|     0|      3.000|     33.000\nRTD|      5.000|      7.000|     19.000|       0|     0|      3.000|     33.000\n<strong>(<em>Contr\u00f4le-C<\/em>)<\/strong>\n---|-----------|-----------|-----------|--------|------|-------------------------\nRTS|      3.000|      6.000|     33.000|       0|     0|    00:20:04\/00:20:04<\/pre>\n<p style=\"text-align: justify;\">Apr\u00e8s vingt minutes de fonctionnement sous une charge mod\u00e9r\u00e9e, nous obtenons une latence minimale de 3 microsecondes, ce qui est plus cr\u00e9dible que les 9 microsecondes pr\u00e9c\u00e9dentes. Nous pouvons fixer la valeur (dans un script de d\u00e9marrage par exemple).<\/p>\n<pre>\/usr\/xenomai\/bin # <strong>echo 3000 &gt; \/proc\/xenomai\/latency<\/strong>\n\/usr\/xenomai\/bin #<\/pre>\n<h1>Mesure de latence sous charge moyenne<\/h1>\n<p style=\"text-align: justify;\">J&rsquo;ai commenc\u00e9 par une ex\u00e9cution de <code>latency<\/code> pendant deux heures et demi avec une charge moyenne (quelques processus actifs et plusieurs connexions r\u00e9seau).<\/p>\n<pre>\/usr\/xenomai\/bin # <strong>.\/latency -p 100<\/strong>\n== Sampling period: 100 us\n== Test mode: periodic user-mode task\n== All results in microseconds\nwarming up...\nRTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)\nRTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst\nRTD|      1.000|      3.000|     15.000|       0|     0|      1.000|     15.000\nRTD|      2.000|      3.000|     14.000|       0|     0|      1.000|     15.000\nRTD|      2.000|      3.000|     18.000|       0|     0|      1.000|     18.000\nRTD|      1.000|      3.000|     15.000|       0|     0|      1.000|     18.000\n[...]\nTT|  02:29:49  (periodic user-mode task, 100 us period, priority 99)\nRTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst\nRTD|      1.000|      3.000|     16.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     15.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     16.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     16.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     16.000|       0|     0|      0.000|     33.000\nRTD|      2.000|      3.000|     16.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     13.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     13.000|       0|     0|      0.000|     33.000\nRTD|      2.000|      3.000|     14.000|       0|     0|      0.000|     33.000\nRTD|      2.000|      3.000|     14.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     14.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     14.000|       0|     0|      0.000|     33.000\nRTD|      1.000|      3.000|     14.000|       0|     0|      0.000|     33.000\n<strong>(<em>Contr\u00f4le-C<\/em>)<\/strong>\n---|-----------|-----------|-----------|--------|------|-------------------------\nRTS|      0.000|      3.000|     33.000|       0|     0|    02:30:01\/02:30:01\n\/usr\/xenomai\/bin #<\/pre>\n<p style=\"text-align: justify;\">La latence maximale dans ces conditions est de 33 microsecondes, ce qui est tr\u00e8s bon. En outre, nous voyons que sur les \u00e9chantillons d&rsquo;une seconde, la latence maximale est g\u00e9n\u00e9ralement de 15 \u00e0 16 microsecondes.<\/p>\n<h1>Mesure de latence sous haute charge<\/h1>\n<p style=\"text-align: justify;\">J&rsquo;ai relanc\u00e9 <code>latency<\/code> pour un petit test (deux heures) sous une charge plut\u00f4t \u00e9lev\u00e9e en processus et en interruption. J&rsquo;ai lanc\u00e9 sur une autre console le script <code>dohell<\/code> par p\u00e9riodes de cinq minutes avec quelques secondes de repos entre chaque cycle. En outre un <code>ping<\/code> <em>flood<\/em> sur l&rsquo;interface ethernet du Raspberry Pi \u00e9tait ex\u00e9cut\u00e9 depuis un autre poste.<\/p>\n<pre># <strong>.\/latency -p 100 -T 7200<\/strong>\n\n== Sampling period: 100 us\n== Test mode: periodic user-mode task\n== All results in microseconds\nwarming up...\nRTT|  00:00:01  (periodic user-mode task, 100 us period, priority 99)\nRTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst\nRTD|      5.000|     12.000|     22.000|       0|     0|      5.000|     22.000\nRTD|      5.000|     12.000|     37.000|       0|     0|      5.000|     37.000\nRTD|      1.000|     12.000|     34.000|       0|     0|      1.000|     37.000\nRTD|      5.000|     12.000|     22.000|       0|     0|      1.000|     37.000\nRTD|      5.000|     12.000|     35.000|       0|     0|      1.000|     37.000\nRTD|      4.000|     12.000|     22.000|       0|     0|      1.000|     37.000\nRTD|      4.000|     12.000|     35.000|       0|     0|      1.000|     37.000\nRTD|      5.000|     12.000|     22.000|       0|     0|      1.000|     37.000\nRTD|      4.000|     12.000|     32.000|       0|     0|      1.000|     37.000\nRTD|      4.000|     12.000|     22.000|       0|     0|      1.000|     37.000\nRTD|      5.000|     12.000|     39.000|       0|     0|      1.000|     39.000\nRTD|      5.000|     12.000|     22.000|       0|     0|      1.000|     39.000\n[...]\nRTD|      2.000|     12.000|     23.000|       0|     0|     -1.000|     42.000\nRTD|      6.000|     12.000|     26.000|       0|     0|     -1.000|     42.000\nRTD|      4.000|     11.000|     21.000|       0|     0|     -1.000|     42.000\nRTD|      5.000|     11.000|     26.000|       0|     0|     -1.000|     42.000\nRTD|      6.000|     12.000|     18.000|       0|     0|     -1.000|     42.000\nRTD|      6.000|     12.000|     29.000|       0|     0|     -1.000|     42.000\nRTD|      6.000|     12.000|     23.000|       0|     0|     -1.000|     42.000\n---|-----------|-----------|-----------|--------|------|-------------------------\nRTS|     -1.000|     11.000|     42.000|       0|     0|    02:00:00\/02:00:00<\/pre>\n<p style=\"text-align: justify;\">Apr\u00e8s deux heures sous une forte charge, la latence maximale est de 42 microsecondes, ce qui est tout \u00e0 fait tol\u00e9rable pour de nombreuses applications temps r\u00e9el. Nous pouvons remarquer qu&rsquo;apparaissent encore des latences n\u00e9gatives (ou plut\u00f4t une seule occurence d&rsquo;une latence n\u00e9gative), ce qui signifie qu&rsquo;il faudrait plut\u00f4t inscrire la valeur <code>2<\/code> dans <code>\/proc\/xenomai\/latency<\/code><\/p>\n<h1>Conclusion<\/h1>\n<p style=\"text-align: justify;\">Au terme de cette br\u00e8ve exp\u00e9rience, je pense que le petit Raspberry Pi peut \u00eatre tout \u00e0 fait convaincant dans le cadre de syst\u00e8mes temps r\u00e9el, en utilisant le patch Xenomai bien entendu. Je vais mener d&rsquo;autres exp\u00e9rimentations plus pouss\u00e9es, que je r\u00e9capitulerai ici.<\/p>","protected":false},"excerpt":{"rendered":"<p>Depuis l&rsquo;arriv&eacute;e du Raspberry Pi, j&rsquo;ai eu envie d&rsquo;installer Xenomai dessus pour me faire une id&eacute;e de ses capacit&eacute;s dans le domaine&nbsp; temps r&eacute;el. J&rsquo;ai trouv&eacute; enfin le temps de m&rsquo;en occuper&nbsp;; voici un petit compte-rendu de l&rsquo;installation.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,8,11,14],"tags":[],"class_list":["post-2842","post","type-post","status-publish","format-standard","hentry","category-embarque","category-linux-2","category-raspberry-pi","category-temps-reel"],"_links":{"self":[{"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/posts\/2842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/comments?post=2842"}],"version-history":[{"count":4,"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/posts\/2842\/revisions"}],"predecessor-version":[{"id":6426,"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/posts\/2842\/revisions\/6426"}],"wp:attachment":[{"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/media?parent=2842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/categories?post=2842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blaess.fr\/christophe\/wp-json\/wp\/v2\/tags?post=2842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}