LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-29-2014, 12:53 PM   #31
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 621

Original Poster
Rep: Reputation: 114Reputation: 114

Quote:
Originally Posted by jtsn View Post
No: http://yarchive.net/comp/linux/cmov.html
Code:
From: Linus Torvalds <torvalds@osdl.org>

CMOV (and, more generically, any "predicated instruction") tends to
generally a bad idea on an aggressively out-of-order CPU. It doesn't
always have to be horrible, but in practice it is seldom very nice, and
(as usual) on the P4 it can be really quite bad.

On a P4, I think a cmov basically takes 10 cycles.
So now, where you've narrowed it down to a single instruction and got disproved by the kernel inventor himself, I think we can close the case.
Oh, You Glorius Master of Assembly, looks like on the test program what you narrowed, my humble outdated computer where I work now (an silly Bulldozer X8 Black Edition with only 16G RAM, still running Slackware 32) have another opinion from you:

Code:
bash-4.3# time ./test.with_cmov
600000000

real    0m0.101s
user    0m0.100s
sys     0m0.000s
bash-4.3# time ./test.normal
600000000

real    0m0.134s
user    0m0.133s
sys     0m0.001s
bash-4.3#
So, without CMOV, we have a slowdown about 33%. How you comment?

Last edited by Darth Vader; 05-29-2014 at 01:07 PM.
 
Old 05-29-2014, 01:04 PM   #32
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 477

Rep: Reputation: 122Reputation: 122
Quote:
16G RAM, still running Slackware 32
why?!
 
Old 05-29-2014, 01:05 PM   #33
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 621

Original Poster
Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by Didier Spaier View Post
Then do it yourself first (with all packages but -noarch ones rebuilt, of course) and come back with a link to an ISO image of it. I'm sure that a lot of us will be grateful for that and eager to try it. Maybe you could get advises from Eric or Stuart who already did something similar.
If I do that, there will be Yet Another Slackware Fork. And no, I do not want to fork Slackware (again).

So, this time, I want to see the community interest. And the Slackware community contribution and help. As a project to possibly enhance the Slackware.

For example, while I have no problems to do a i686 build (after all I earn a life from maintaining a in-house i686 server distro derived from Slackware), who offer the web hosting for packages and its ISOs?

Also, is there someone another interested to (re)build packages? There we have "only" like 1000 to manage...
 
Old 05-29-2014, 01:19 PM   #34
Darth Vader
Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 621

Original Poster
Rep: Reputation: 114Reputation: 114
Quote:
Originally Posted by solarfields View Post
why?!
Why not?

Call me fundamentalist, but I prefer the orthodox Slackware 32, and I need to use some 32 bit only apps, while I dislike (no offense, Eric!) the multilib, as a suplementary complication.

Also, I love and I find very useful the 4G memory limit per process...

I believe that Slackware (32) is not really much slower that the x64 version, yet it is not of use of all processor horse-power. The subject of this thread also...

Last edited by Darth Vader; 05-29-2014 at 01:20 PM.
 
Old 05-29-2014, 01:23 PM   #35
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 943

Rep: Reputation: 108Reputation: 108
Just drop 32 bits support. We have had 64 bits processors avaliable for years (at least 10). And, for example, Windows XP 64 bits was release 12 years ago (!!!!) It bothers me that people still use and still develop for 32 bits. Some companies/people release things in 32 BITS ONLY forcing us with atrocities like multilib.

Last edited by moisespedro; 05-29-2014 at 01:25 PM.
 
Old 05-29-2014, 01:26 PM   #36
genss
Member
 
Registered: Nov 2013
Posts: 239

Rep: Reputation: Disabled
Quote:
Originally Posted by Darth Vader View Post
an silly Bulldozer X8 Black Edition
cmov problem is a intel one, just like reads from a page boundary are (and other non aligned reads/writes, but over a 4k boundary especially)
yay market leaders

Last edited by genss; 05-29-2014 at 01:30 PM.
 
Old 05-29-2014, 01:43 PM   #37
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Quote:
Originally Posted by moisespedro View Post
Just drop 32 bits support. We have had 64 bits processors avaliable for years (at least 10). And, for example, Windows XP 64 bits was release 12 years ago (!!!!) It bothers me that people still use and still develop for 32 bits. Some companies/people release things in 32 BITS ONLY forcing us with atrocities like multilib.
I would support that, but only if I can be around when you explain to users of these CPUs http://ark.intel.com/search/advanced...tionSet=32-bit (note how the newest one is only 4 years old) why you think they shouldn't use Slackware.
 
3 members found this post helpful.
Old 05-29-2014, 01:58 PM   #38
LuckyCyborg
Member
 
Registered: Mar 2010
Posts: 124

Rep: Reputation: 19
Quote:
Originally Posted by Darth Vader View Post
Code:
bash-4.3# time ./test.with_cmov
600000000

real    0m0.101s
user    0m0.100s
sys     0m0.000s
bash-4.3# time ./test.normal
600000000

real    0m0.134s
user    0m0.133s
sys     0m0.001s
bash-4.3#
With Phenom x4 9550 2.2G and memory of 4Gb, slowdown 30% I think, with the test from http://yarchive.net/comp/linux/cmov.html

Code:
bash-4.3# time ./test.cmov
600000000                                                                                                                                                                                     
                                                                                                                                                                                              
real    0m0.120s                                                                                                                                                                              
user    0m0.119s                                                                                                                                                                              
sys     0m0.001s                                                                                                                                                                              
bash-4.3# time ./test
600000000                                                                                                                                                                                     
                                                                                                                                                                                              
real    0m0.156s                                                                                                                                                                              
user    0m0.155s                                                                                                                                                                              
sys     0m0.001s
I wonder how many another slowdowns are hidden there, using the current build triplet: -march=i486 -mtune=i686

Last edited by LuckyCyborg; 05-29-2014 at 03:21 PM.
 
Old 05-29-2014, 02:10 PM   #39
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,381

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
Quote:
Originally Posted by Darth Vader View Post
If I do that, there will be Yet Another Slackware Fork. And no, I do not want to fork Slackware (again).

So, this time, I want to see the community interest. And the Slackware community contribution and help. As a project to possibly enhance the Slackware.

For example, while I have no problems to do a i686 build (after all I earn a life from maintaining a in-house i686 server distro derived from Slackware), who offer the web hosting for packages and its ISOs?

Also, is there someone another interested to (re)build packages? There we have "only" like 1000 to manage...
If you don't want to fork Slackware, then just request Pat to replace i486 with i686. Good luck.

And to get other people to contribute to something, you have to first build a team of individuals sharing you aim and eager to devote time to help reach it (but maybe that was the purpose of your first post in this thread?), and/or to attract people showing what you've already done. At least that's my opinion.

Last edited by Didier Spaier; 05-29-2014 at 02:16 PM.
 
Old 05-29-2014, 03:31 PM   #40
Arkerless
Member
 
Registered: Mar 2006
Distribution: Give me Slack or give me death.
Posts: 66

Rep: Reputation: 42
I think you are starting from this naive assumption that somehow telling the optimizer to target the 686 is going to magically make everything better. It doesnt work that way. Compiler optimizations are not guaranteed, the results depend not only on the target but also on the initial code, etc. If you want to optimize for a 686, the way to do it is to target particular modules that actually do something *specific* which would benefit from a 686 instruction, rewrite the code to make that explicit, THEN do a couple of compiles with different switches, test them, compare the assembler, etc. Simply taking existing code and turning on the compiler instruction-set optimization is not guaranteed to improve anything - it very well might break it, or reduce performance.

You also have to remember that these CPUs are already optimized for their most common use case, which is running proprietary binaries. Users of proprietary software dont have the option to edit and recompile so the CPU manufacturers have put a huge amount of work into optimizing new CPUs to run old code. YES, if you are doing something specific where a later instruction would be helpful (matrix math comes to mind) AND you can do some testing and rewriting to make it all work correctly, you could see a very large increase in performance, but that's an exceptional case. It would be more typical to see negligible effects either way, or even noticeable slowdown and bloat, from enabling un-needed optimizers.

So I think Pat's taken exactly the correct approach here by being conservative with CPU targets. It's unlikely that forcing a higher build target across the board would actually result in a better system, but it would certainly result in a system that would no longer run on some of our hardware.

If you identify a specific package that actually does, say, a lot of matrix math, you would probably be better off recompiling that one specific package with optimizations, and leaving the rest of the distro the way it is.
 
Old 05-29-2014, 04:11 PM   #41
jprzybylski
Member
 
Registered: Apr 2011
Location: Canada
Distribution: Slackware
Posts: 98

Rep: Reputation: 23
I'm not certain if compiling for i686 improves processing speed, but let's say it does.

Personally, switching to i686 isn't worth it. If I'm concerned about processor speed, I'm going x86_64. If I'm using an old computer, it's probably because I have been for a long time, and I want as few architectural changes as possible. The speed boost gained from i686 doesn't justify cutting older computers out of the picture, especially when the real speed is in x86_64.

My .
 
1 members found this post helpful.
Old 05-29-2014, 04:43 PM   #42
moisespedro
Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware and LFS
Posts: 943

Rep: Reputation: 108Reputation: 108
What effort would it take to recompile all Slackware packages for i686? My vacations are coming and I have nothing better to do.
 
Old 05-29-2014, 05:05 PM   #43
LuckyCyborg
Member
 
Registered: Mar 2010
Posts: 124

Rep: Reputation: 19
Also I am willing to collaborate in this recompilation for i686.

I guess my computer can handle reasonable as build-server. Like I said, Phenom 9550 with 4G memory. The hard drive works about at 100MB/s as transfer rate.
 
Old 05-29-2014, 05:26 PM   #44
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 237

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Darth Vader View Post
Sorry my humble opinion, but to take a classic example of conditional move used i.e. for a nice "IF THEN ELSE":

i486 code

Code:
    XOR     EBX,EBX                ; Clear register for later
    ADD     ECX,[SMALL_COUNT]      ; Adjusts by some small counter value
    JNC     Continue               ; If ECX didn't overflow, continue
    MOV     ECX,EBX                ; Reinitialize ECX if it overflowed
Continue:
Executed on 4 opcode reads.

i686 code

Code:
    XOR     EBX,EBX                ; Clear register for later
    ADD     ECX,[SMALL_COUNT]      ; Adjusts by some small counter value
    CMOVC   ECX,EBX                ; If ECX overflowed, reinitialize to EBX
Executed on 3 opcode reads.
And the latter code will not run on all 686 processors. CMOV was not available on certain Cyrix and VIA processors. While admitted only a limited number of chips, they were quite popular and widely used in both laptop and desktop boards.
 
Old 05-29-2014, 05:46 PM   #45
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 188
Blog Entries: 1

Rep: Reputation: 38
I use a very old computer as a router/firewall, file server, database and cups at home. I will add some cameras and weight scale into it, when I have chance to scavenge some used usb cameras, make it a simple security system at home, when people pushes my door bell, it will send snap pictures and weight number to my phone.

old computer was PentiumII 233, whole system's power consumption used to be around 50W, later I switched it to celeron 533A and other parts, reduced it down to 30W. All the parts I scavenged from other people's junks throughout many years.

A consumer graded router couldn't do a lot thing as well as a old used computer (a dedicated commercial router ) and I agree, more efficient computer is the better way, if you can manage it at minimum cost.

Last edited by number22; 05-29-2014 at 06:06 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trinity Desktop for Slackware-13.37 i486 and x86_64 Stragonian Slackware 24 07-31-2013 05:48 PM
How to get a fully functional linux machine from the scratch? anand.arumug Linux - General 14 01-09-2010 10:07 PM
Slackware Functional Commands IwannaSlack Slackware 13 11-13-2009 01:17 PM
Slackware: i486 and optimizations alphisb0t Slackware 6 08-07-2007 04:08 PM
machine arch and cpu (i486/i686) abs Slackware 6 08-22-2004 08:28 AM


All times are GMT -5. The time now is 09:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration