LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-21-2014, 11:15 PM   #1
zerop
Member
 
Registered: Jul 2014
Posts: 65

Rep: Reputation: Disabled
Question what is unrolled loops and how to check and know unrolled loops of cpu in ubuntu


If memory access were 100 cycles, and the unrolled loops are two cycles apart, LookAhead could be set to 50

it seems prefetch lookahead is (memory access)/(unrolled loops)

how to check how many cycles in memory access?
how to check how many unrolled loops ?
 
Old 07-25-2014, 05:07 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Loop unrolling is a compiler optimization technique. It is not a setting in your OS. If you know the settings you want in software then you can set the optimizations at compile time.

What is the actual problem you're trying to solve? Give the overall explanation of your problem and don't ask about sub-parts.
 
Old 07-25-2014, 05:10 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by zerop View Post
if ... and the unrolled loops are two cycles apart
Where did that huge if come from?

I googled your assumption and got:

http://stackoverflow.com/a/19749677

Which doesn't make your question clearer.

Maybe it would help if you tell us why you're asking the question?

Quote:
how to check how many unrolled loops ?
Sorry, but I'm going to have to give the obvious answer here. You dissassemble the program and examine the assembly.

Last edited by dugan; 07-25-2014 at 05:37 PM.
 
Old 07-27-2014, 12:31 AM   #4
zerop
Member
 
Registered: Jul 2014
Posts: 65

Original Poster
Rep: Reputation: Disabled
this stackoverflow is question is what i search come from

however it do not answer unrolled loops
 
Old 07-31-2014, 10:22 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
The very-simple essential idea of "loop unrolling" is that ... sometimes, the conditional-instructions that send the computer back into another iteration of a loop are expensive, whereas the instructions that make up the body of the loop are not. Therefore, if (for example) you know that the loop will be executed some multiple-of-three times, it might be faster to generate three instances of the loop-body in a row, then have the loop execute one-third as many times. It's a compiler optimization, in the classic "speed vs. space" tradition.

Last edited by sundialsvcs; 07-31-2014 at 10:23 PM.
 
  


Reply



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
help with loops keina Linux - General 2 02-27-2013 12:39 AM
non cpu burned loops? mpeg2server Programming 5 09-19-2009 03:41 AM
CPU usage 100% due to loops in multiple threads Manjunath1847 Linux - General 4 08-10-2009 02:45 AM
Dual boot: Ubuntu 8.04 and XP. XP won't boot now - loops back to Ubuntu Slowbey Linux - Newbie 9 01-05-2009 02:44 AM
XP won't boot, loops back to GRUB: dual-boot XP and Ubuntu dan2010 Linux - Newbie 4 08-08-2007 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:39 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration