I want to thank you, too, for the new patches @ck ! Maybe I'll bother with some questions about the left out patches later. ;-)

For now I want to crosspost for everyone also using the BFQ I/O scheduler patches, that there's a new fix out as of today. Arianna doesn't use the word "critical" or sth. scary like this but it maybe a good idea to have it.

I'd really like to see those extended -march and gcc -O options (2/3/s) being part and selectable in the standard kernel config process. (Perhaps you also write a little patch for those -O options one day ;) )

@graysky: The 'native' selection compiled and behaves fine! :-)))2 questions:1.) The vermagic in 'modinfo _modulename_' tells me "CORE2" on a PIII Tualatin --- Why?2.) How and where can we add -mtune=native (or any other cpu-type) to your patch? According to 'gcc -march=native -E -v - &1 | grep cc1' I'd only get a "-mtune=generic" --- Or doesn't my question make any sense?

2) My understanding of -march=native is that users may omit the -mtune parameter altogether since it is handled therein. Look at the URL you posted: "Specifying -march=cpu-type implies -mtune=cpu-type."

ad 1.) At least this doesn't seem to be harmful at runtime. I've found the culprit: In your provided kernel-38-gcc48-1.patch there's a copy&paste line mistake in the first hunk where you inserted the MNATIVE piece into linux/arch/x86/include/asm/module.h (wrongly inbetween the MCORE2 definition).

ad 2.) Some more (re)search leads me to the same understanding like yours: The -mtune=cpu-type may bring further optimizations "under the constraints of the selected -march's instruction set" like I read them in your patch for CORE2 and following. For my "pentium3" it selects automagically -mtune=generic -- perhaps as there is no more possible optimization, I assume.

Who wants to check what -march=native (or whatever) really enables/disables should have a look at linux/arch/x86/kernel/asm-offsets.s -- in the header you'll find useful information.

But that leads me to another question: Why does my linux/arch/x86/Makefile contain this section:"# prevent gcc from generating any FP code by mistakeKBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)KBUILD_CFLAGS += $(call cc-option,-mno-avx,)"That effectively disables the use of -msse & -mmmx on my machine as I see in the previously mentioned asm-offsets.s header. Is it openSUSE kernel-source specific or do you have it, too?

Which Car you want..? Here is a best list of Cars and Vehicles, Hot Vehicles, Strange Cars, Super Cars Model, Funny Cars, Car Latest Models, Cars with Girls, Cars like helicopter and Most Speed and Expensive CarsWorldLatestVehicles.com

Many peoples want to earn money on internet without any investment but there is many online jobs which have many investments. Now you can earn without any investment with Just clicking and Earn daily upto 10 Dollars.Join this Best opportunity to make money online without any investment or Charges.HotProClicks.com

In short: (=> There are a couple of very rare exceptions and my wording might not be perfectly accurate)1/ Most of the sse instructions work on FP datas=> will use FP registers.2/ These registers are large and it takes time to save/restore them to/from the stack when calling a procedure.3/ The Linux kernel does not need FP numbers => Its procedures do not make provision for saving/restoring the FP registers.This is indeed the most efficient. Can you imagine what your performances would be if FP registers were saved/restored on any system call ?4/ Normally, the kernel code is written so that gcc should not believe it profitable to generate fp instructions. (Hence my "I fail to understand which sections of the kernel code you expect optimizing")But, if, by mistake, (from the kernel programmer or because of a fancy gcc heuristic), gcc believes profitable to generate FP instructions and is allowed to, then the result of the operations at run time will necessarily be, at best,... random!=> -mno-sse -mno-mmx...

Thank you very much for your 'short' ;-) explanation. This helps me to understand the too short description found in the linux/arch/x86/Makefile a bit better.

So -- if I understand your words -- having -mmmx -msse can lead to slower operations or even wrong results? Did I get it correctly what you say? And, maybe: Do you have a guess what things would/could get slower with these instructions?

Yes ! this is a "short" explanation. The exact reality would need twice as much words...

No ! having -mmmx -ssse will *not* "lead to slower operations or even wrong results"!

having -mmmx -ssse will at best do nothing because the Linux kernel is everywhere perfect and gcc will not use these instruction sets at all,

OR

will *necessarily* lead to wrong results if some gcc heuristic is fancy enough to generate fp code for some fancy section of code.

The probability of the latter is greater than the probability of the former.

If you want to safely enable gcc to use these instruction sets then you *must* rewrite the kernel procedures that could be concerned by such an "optimization", making provision for saving/restoring the FP registers.But then, you'll realize at run time, that the time needed to save/restore the fp registers is *much* greater than what you win with your sse/mmx instructions.

On a side note about instruction sets / gcc optimizations, the patch graysky mentions can lead to surprising results.As an example of a surprise, you can see that the kernel makefile selects -march=core2 and mtune="generic" for an Intel core 2... and the patch, probably believing that the kernel devs want to ruin the performances of the kernel, corrects that and selects mtune=core2.I cannot tell with newer gcc versions but it has been noticed that gcc-4.5 was generating better (more efficient) code with mtune=generic...

It's true that the kernel doesn't concern itself with floating point, and it's wrong to force the issue with compiler parameters, but keep in mind that Linux is pretty much the only kernel that bans FP operations. Other kernels (or operating systems) don't do that, and performance is just fine. Restoring the registers doesn't take much time.

- AFAIK, and at least up to V9, FreeBSD is in the exact same situation than Linux.- As for OS-X, the "Kernel Programming Guide" writes : "you should avoid doing using floating-point math or AltiVec instructions in the kernel... It is not forbidden, but is strongly discouraged."

I haven't found any remarkable performance issues with -msse -mmmx nor advantages with kernel default. Maybe it's better to keep kernel default as some people may already have made their heads burn exhaustively about this topic. ^^

Very minor cosmetic only problem (no immediate functional impact) but potentially leading to confusion :

Since 2.6.37 I think, the BFS patchset forces CONFIG_IRQ_TIME_ACCOUNTING=y.

Since 3.7, Linux introduced the "cputime accounting" configuration menu, offering CONFIG_IRQ_TIME_ACCOUNTING in an exclusive-or with a new config option representing the default choice : CONFIG_TICK_CPU_ACCOUNTING.

Once BFS-patched, the "cputime accounting" configuration menu only offers the un-deselectable CONFIG_TICK_CPU_ACCOUNTING option.

a/ This may lead to the confusion for the user who knows BFS wants CONFIG_IRQ_TIME_ACCOUNTING and that both are in exclusive-or.

b/ There is no immediate functional problem as CONFIG_IRQ_TIME_ACCOUNTING=y is actually set in the .config

c/ Depending on how things evolve on the kernel side, this might lead to troubles in the future as both CONFIG_IRQ_TIME_ACCOUNTING and CONFIG_TICK_CPU_ACCOUNTING are set in the .config when the kernel devs meant them in exclusive-or.

Hello admin, I m the owner of BORN to Hack (a facebook group ' http://www.facebook.com/groups/143024722436672?refid=48 ) I m searching for partnrs .U CAN POST Your article there and can advertise your blog . If u r interested plz join the group.

It runs for hours without problems. I had a little weird problem shutting down:The fan kept rolling. But that might be dueto some othe buggyness of Linux-3.9Greg presented over a hundred patches in thestable-queue yesterday planed for linux-3.9.1. Most of them arm related. The funny time accounting of Linux-3.9 doesn't change but withlinux-3.9.1rc-bfs

I also had an error with first try compilinglinux-3.9.1rc-bfsI quickly saw it was CONFIG_IRQ_TIME_ACCOUNTINGrelated. I knew this is mandatory for Bfs. Iquilt poped Bfs-patch. I re-didmake menuconfigdisabled CONFIG_IRQ_TIME_ACCOUNTING - savedenabled CONFIG_IRQ_TIME_ACCOUNTING - savedrepatched Bfsand in the second try Linux-3.9.1rc-ck1-bfscompiled through.And runs perfectly.Very thanks from Hamburg

@Manuel, I meant there perhaps is a problem in the auto generation of linux/.config when Bfs-patch applied. After looking in your link, you:--- config TICK_CPU_ACCOUNTING bool "Simple tick based cputime accounting" depends on !S390+ depends on !SCHED_BFS---Uups, does this mean Bfs is incompatible with TICK_CPU_ACCOUNTING ? I ask because I had before:---grep TICK_CPU_ACCOUNTING config*config-3.8.10-bfs:CONFIG_TICK_CPU_ACCOUNTING=y---Ralph Ulrich

World's Most Popular Cars, Hot Speed Cars, Hot Cars with Hot Girls, Cars Latest Pictures with all info, Latest updates Cars Models and Company Cars, Strange Vehicles, Concept Cars, Top 10 Expensive Cars in the World.Visit this Link for More Strange Vehicles and Cars with Latest info and PicturesWorldLatestVehicles.com