* [PATCH] tune-i686: Add new tune for better support of 686-class CPUs.
@ 2018-01-11 4:08 Carlos Alberto Lopez Perez
2018-01-11 10:29 ` Richard Purdie
2018-01-15 20:02 ` [PATCH v2] " Carlos Alberto Lopez Perez
0 siblings, 2 replies; 4+ messages in thread
From: Carlos Alberto Lopez Perez @ 2018-01-11 4:08 UTC (permalink / raw)
To: openembedded-core
There isn't currently any tune available for i686 x86 optimizations.
The tune for i586 doesn't enable i686 specific optimizations, and the
one for core2 enables things that won't work on a i686 CPU (like SSE3).
This patch also changes the default tune for the qemux86 machine from
i586 to i686. This should cause no issue, as "runqemu qemux86" already
defaults to run with "-cpu pentium2".
The tune for core2 now inherits from this one, which allows to remove
the override on the X86ARCH32 definition.
Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
---
meta/conf/machine/include/tune-core2.inc | 7 ++-----
meta/conf/machine/include/tune-i686.inc | 25 +++++++++++++++++++++++++
meta/conf/machine/qemux86.conf | 2 +-
3 files changed, 28 insertions(+), 6 deletions(-)
create mode 100644 meta/conf/machine/include/tune-i686.inc
diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
index f4ba43fbfd..6a03466650 100644
--- a/meta/conf/machine/include/tune-core2.inc
+++ b/meta/conf/machine/include/tune-core2.inc
@@ -8,11 +8,8 @@
#
DEFAULTTUNE ?= "core2-32"
-# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
-X86ARCH32 ?= "i686"
-
# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-i686.inc
# Extra tune features
TUNEVALID[core2] = "Enable core2 specific processor optimizations"
@@ -23,7 +20,7 @@ AVAILTUNES += "core2-32"
TUNE_FEATURES_tune-core2-32 = "${TUNE_FEATURES_tune-x86} core2"
BASE_LIB_tune-core2-32 = "lib"
TUNE_PKGARCH_tune-core2-32 = "core2-32"
-PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i586} core2-32"
+PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i686} core2-32"
AVAILTUNES += "core2-64"
TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2"
diff --git a/meta/conf/machine/include/tune-i686.inc b/meta/conf/machine/include/tune-i686.inc
new file mode 100644
index 0000000000..c2bb534874
--- /dev/null
+++ b/meta/conf/machine/include/tune-i686.inc
@@ -0,0 +1,25 @@
+#
+# The i686 CPU family was introduced with the Intel Pentium Pro in 1995.
+# It has as required feature flags: fpu tsc cx8 cmov.
+#
+# It is the minimum CPU required by the Debian i386 port.
+# https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html
+#
+#
+
+DEFAULTTUNE ?= "i686"
+X86ARCH32 ?= "i686"
+
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
+require conf/machine/include/tune-i586.inc
+
+# Extra tune features
+TUNEVALID[i686] = "Enable i686 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i686', ' -march=i686', '', d)}"
+
+# Extra tune selections
+AVAILTUNES += "i686"
+TUNE_FEATURES_tune-i686 = "${TUNE_FEATURES_tune-x86} i686"
+BASE_LIB_tune-i686 = "lib"
+TUNE_PKGARCH_tune-i686 = "i686"
+PACKAGE_EXTRA_ARCHS_tune-i686 = "${PACKAGE_EXTRA_ARCHS_tune-i586} i686"
diff --git a/meta/conf/machine/qemux86.conf b/meta/conf/machine/qemux86.conf
index c53f7a92ce..f01cbeeb35 100644
--- a/meta/conf/machine/qemux86.conf
+++ b/meta/conf/machine/qemux86.conf
@@ -8,7 +8,7 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
require conf/machine/include/qemu.inc
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-i686.inc
require conf/machine/include/qemuboot-x86.inc
KERNEL_IMAGETYPE = "bzImage"
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] tune-i686: Add new tune for better support of 686-class CPUs.
2018-01-11 4:08 [PATCH] tune-i686: Add new tune for better support of 686-class CPUs Carlos Alberto Lopez Perez
@ 2018-01-11 10:29 ` Richard Purdie
2018-01-11 13:15 ` Carlos Alberto Lopez Perez
2018-01-15 20:02 ` [PATCH v2] " Carlos Alberto Lopez Perez
1 sibling, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2018-01-11 10:29 UTC (permalink / raw)
To: Carlos Alberto Lopez Perez, openembedded-core
On Thu, 2018-01-11 at 05:08 +0100, Carlos Alberto Lopez Perez wrote:
> There isn't currently any tune available for i686 x86 optimizations.
> The tune for i586 doesn't enable i686 specific optimizations, and the
> one for core2 enables things that won't work on a i686 CPU (like
> SSE3).
>
> This patch also changes the default tune for the qemux86 machine from
> i586 to i686. This should cause no issue, as "runqemu qemux86"
> already
> defaults to run with "-cpu pentium2".
>
> The tune for core2 now inherits from this one, which allows to remove
> the override on the X86ARCH32 definition.
>
> Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
> ---
> meta/conf/machine/include/tune-core2.inc | 7 ++-----
> meta/conf/machine/include/tune-i686.inc | 25
> +++++++++++++++++++++++++
> meta/conf/machine/qemux86.conf | 2 +-
> 3 files changed, 28 insertions(+), 6 deletions(-)
> create mode 100644 meta/conf/machine/include/tune-i686.inc
Please don't do multiple things in a single commit like this.
The qemux86 default tune change isn't as simple as it might first
appear as it changes the output artefacts which may or may not mean
changes to the testing infrastructure (I'd hope not but I also know the
reality).
Adding the tune itself should be more straightforward.
We do need to keep track of the comment "Set x86 target arch to i686,
so that glibc enables SSE optimised memcpy, etc." as i586 verses i686
does make a significant difference to the glibc config.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tune-i686: Add new tune for better support of 686-class CPUs.
2018-01-11 10:29 ` Richard Purdie
@ 2018-01-11 13:15 ` Carlos Alberto Lopez Perez
0 siblings, 0 replies; 4+ messages in thread
From: Carlos Alberto Lopez Perez @ 2018-01-11 13:15 UTC (permalink / raw)
To: Richard Purdie, openembedded-core
[-- Attachment #1.1: Type: text/plain, Size: 2047 bytes --]
On 11/01/18 11:29, Richard Purdie wrote:
> On Thu, 2018-01-11 at 05:08 +0100, Carlos Alberto Lopez Perez wrote:
>> There isn't currently any tune available for i686 x86 optimizations.
>> The tune for i586 doesn't enable i686 specific optimizations, and the
>> one for core2 enables things that won't work on a i686 CPU (like
>> SSE3).
>>
>> This patch also changes the default tune for the qemux86 machine from
>> i586 to i686. This should cause no issue, as "runqemu qemux86"
>> already
>> defaults to run with "-cpu pentium2".
>>
>> The tune for core2 now inherits from this one, which allows to remove
>> the override on the X86ARCH32 definition.
>>
>> Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
>> ---
>> meta/conf/machine/include/tune-core2.inc | 7 ++-----
>> meta/conf/machine/include/tune-i686.inc | 25
>> +++++++++++++++++++++++++
>> meta/conf/machine/qemux86.conf | 2 +-
>> 3 files changed, 28 insertions(+), 6 deletions(-)
>> create mode 100644 meta/conf/machine/include/tune-i686.inc
>
> Please don't do multiple things in a single commit like this.
>
> The qemux86 default tune change isn't as simple as it might first
> appear as it changes the output artefacts which may or may not mean
> changes to the testing infrastructure (I'd hope not but I also know the
> reality).
>
> Adding the tune itself should be more straightforward.
> > We do need to keep track of the comment "Set x86 target arch to i686,
> so that glibc enables SSE optimised memcpy, etc." as i586 verses i686
> does make a significant difference to the glibc config.
>
Sure, I will keep track of the comment. I'll follow-up with a new patch.
Due to this significant difference in performance for glibc, it seems to
me it is worth to try the change on the default tune on qemux68 machine.
Hopefully it will speed-up a bit the testing times both on the testing
architecture and the developer machines.
Will splitting the patch in two will help with this?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 914 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] tune-i686: Add new tune for better support of 686-class CPUs.
2018-01-11 4:08 [PATCH] tune-i686: Add new tune for better support of 686-class CPUs Carlos Alberto Lopez Perez
2018-01-11 10:29 ` Richard Purdie
@ 2018-01-15 20:02 ` Carlos Alberto Lopez Perez
1 sibling, 0 replies; 4+ messages in thread
From: Carlos Alberto Lopez Perez @ 2018-01-15 20:02 UTC (permalink / raw)
To: openembedded-core
There isn't currently any tune available for i686 x86 optimizations.
The tune for i586 doesn't enable i686 specific optimizations, and the
one for core2 enables things that won't work on a i686 CPU (like SSE3).
Make the tune for core2 inherits from this one and move there the
setting of X86ARCH32.
Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
---
meta/conf/machine/include/tune-core2.inc | 7 ++-----
meta/conf/machine/include/tune-i686.inc | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 5 deletions(-)
create mode 100644 meta/conf/machine/include/tune-i686.inc
diff --git a/meta/conf/machine/include/tune-core2.inc b/meta/conf/machine/include/tune-core2.inc
index f4ba43fbfd..6a03466650 100644
--- a/meta/conf/machine/include/tune-core2.inc
+++ b/meta/conf/machine/include/tune-core2.inc
@@ -8,11 +8,8 @@
#
DEFAULTTUNE ?= "core2-32"
-# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
-X86ARCH32 ?= "i686"
-
# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
-require conf/machine/include/tune-i586.inc
+require conf/machine/include/tune-i686.inc
# Extra tune features
TUNEVALID[core2] = "Enable core2 specific processor optimizations"
@@ -23,7 +20,7 @@ AVAILTUNES += "core2-32"
TUNE_FEATURES_tune-core2-32 = "${TUNE_FEATURES_tune-x86} core2"
BASE_LIB_tune-core2-32 = "lib"
TUNE_PKGARCH_tune-core2-32 = "core2-32"
-PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i586} core2-32"
+PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i686} core2-32"
AVAILTUNES += "core2-64"
TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2"
diff --git a/meta/conf/machine/include/tune-i686.inc b/meta/conf/machine/include/tune-i686.inc
new file mode 100644
index 0000000000..bdb4799209
--- /dev/null
+++ b/meta/conf/machine/include/tune-i686.inc
@@ -0,0 +1,27 @@
+#
+# The i686 CPU family was introduced with the Intel Pentium Pro in 1995.
+# It has as required feature flags: fpu tsc cx8 cmov.
+#
+# It is the minimum CPU required by the Debian i386 port.
+# https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html
+#
+#
+
+DEFAULTTUNE ?= "i686"
+
+# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc.
+X86ARCH32 ?= "i686"
+
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
+require conf/machine/include/tune-i586.inc
+
+# Extra tune features
+TUNEVALID[i686] = "Enable i686 specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i686', ' -march=i686', '', d)}"
+
+# Extra tune selections
+AVAILTUNES += "i686"
+TUNE_FEATURES_tune-i686 = "${TUNE_FEATURES_tune-x86} i686"
+BASE_LIB_tune-i686 = "lib"
+TUNE_PKGARCH_tune-i686 = "i686"
+PACKAGE_EXTRA_ARCHS_tune-i686 = "${PACKAGE_EXTRA_ARCHS_tune-i586} i686"
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-15 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11 4:08 [PATCH] tune-i686: Add new tune for better support of 686-class CPUs Carlos Alberto Lopez Perez
2018-01-11 10:29 ` Richard Purdie
2018-01-11 13:15 ` Carlos Alberto Lopez Perez
2018-01-15 20:02 ` [PATCH v2] " Carlos Alberto Lopez Perez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox