{"action":"created","issue":{"url":"https://api.github.com/repos/linux-sunxi/meta-sunxi/issues/25","labels_url":"https://api.github.com/repos/linux-sunxi/meta-sunxi/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/linux-sunxi/meta-sunxi/issues/25/comments","events_url":"https://api.github.com/repos/linux-sunxi/meta-sunxi/issues/25/events","html_url":"https://github.com/linux-sunxi/meta-sunxi/issues/25","id":25331622,"number":25,"title":"Improve performance by changing default machine tuning options","user":{"login":"KristofRobot","id":5243257,"avatar_url":"https://avatars.githubusercontent.com/u/5243257?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofRobot","html_url":"https://github.com/KristofRobot","followers_url":"https://api.github.com/users/KristofRobot/followers","following_url":"https://api.github.com/users/KristofRobot/following{/other_user}","gists_url":"https://api.github.com/users/KristofRobot/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofRobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofRobot/subscriptions","organizations_url":"https://api.github.com/users/KristofRobot/orgs","repos_url":"https://api.github.com/users/KristofRobot/repos","events_url":"https://api.github.com/users/KristofRobot/events{/privacy}","received_events_url":"https://api.github.com/users/KristofRobot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-01-09T16:28:04Z","updated_at":"2015-02-03T14:19:38Z","closed_at":"2014-02-03T21:20:16Z","body":"*Note: I am focusing on Cubieboard2 in this post, as that is the board I own and can test on, but this should be relevant to other boards as well*\r\n\r\nCurrently our cubieboard2 machine.conf file [1] falls back on the default tuning option specified in arch-armv7a.inc [2]:\r\n```\r\nDEFAULTTUNE ?= \"armv7a-neon\"\r\n```\r\nThis boils down to the following compiler options:\r\n```\r\n-march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon\r\n```\r\n\r\nThat is really the lowest performance option, and cubieboard2 is capable of more than that.\r\nSpecifically, it supports NEONv2, VFPv4 and Thumb-2 (see [3] and [4] ) - but the default tuning file does not take advantage of that.\r\n\r\nI'd propose to set the default tune to something that supports all the capabilities of the Allwinner A20 chip, i.e.:\r\n```\r\nDEFAULTTUNE = \"cortexa7thf-neon\"\r\n```\r\nresulting in\r\n```\r\n-march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7\r\n```\r\n\r\nNote that this still does not take advantage of the NEONv2/VFPv4 capabilities of the Allwinner A20 - for that we'd need ``-mfpu=neon-vfpv4`` [5]. I am currently using an ugly hack to force this compile option in my builds, and opened a request upstream to add this ([6]).\r\n\r\nI'll try to run some benchmarks comparing the default with the proposed tuning options above, to put some data behind this, and get an idea of how big the difference is really.\r\n\r\nIn the meantime, all comments welcome.\r\n\r\nThanks!\r\n\r\nKristof\r\n\r\n[1] https://github.com/linux-sunxi/meta-sunxi/blob/master/conf/machine/cubieboard2.conf\r\n[2] https://github.com/openembedded/oe-core/blob/master/meta/conf/machine/include/tune-cortexa7.inc\r\n[3] http://linux-sunxi.org/Allwinner_SoC_Family\r\n[4] http://wits-hep.blogspot.fr/2013/12/fftw-benchmarks-on-cortex-a7.html\r\n[5] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html\r\n[6] https://bugzilla.yoctoproject.org/show_bug.cgi?id=5710"},"comment":{"url":"https://api.github.com/repos/linux-sunxi/meta-sunxi/issues/comments/72657490","html_url":"https://github.com/linux-sunxi/meta-sunxi/issues/25#issuecomment-72657490","issue_url":"https://api.github.com/repos/linux-sunxi/meta-sunxi/issues/25","id":72657490,"user":{"login":"asimko","id":10831632,"avatar_url":"https://avatars.githubusercontent.com/u/10831632?v=3","gravatar_id":"","url":"https://api.github.com/users/asimko","html_url":"https://github.com/asimko","followers_url":"https://api.github.com/users/asimko/followers","following_url":"https://api.github.com/users/asimko/following{/other_user}","gists_url":"https://api.github.com/users/asimko/gists{/gist_id}","starred_url":"https://api.github.com/users/asimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asimko/subscriptions","organizations_url":"https://api.github.com/users/asimko/orgs","repos_url":"https://api.github.com/users/asimko/repos","events_url":"https://api.github.com/users/asimko/events{/privacy}","received_events_url":"https://api.github.com/users/asimko/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T14:19:38Z","updated_at":"2015-02-03T14:19:38Z","body":"Does anybody know how to solve this \"bug\": https://bugzilla.yoctoproject.org/show_bug.cgi?id=7275"}}