- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I managed to get 2.4.34.5 (latest) to compile with ICC10 (ICC9 gets confused very early on thinking there's a function parameter number mismatch somewhere in panic.c for some reason), but for some reason I can only get the Pentium3 version to compile if I specify -march=pentium3. If I leave it as i686, I get an undefined reference _intel_fast_memcpy or some such in a number of modules, and I can't find a reference to that function anywhere in the kernel source.
And even for P3, I can get the kernel to boot as far as finding the first CPU, and then it locks up.
Are there any resources available on this subject? It strikes me as a fairly major/obvious application of ICC.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's possible the impetus has gone from efforts to build kernel with icc, since recent gcc versions are quite effective on recent IA platforms.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know about the impetus, but I know that most code I tried compiling with ICC runs between 25% (MySQL) and 450% faster (home-brewed number crunching library) than with GCC. This is comparing ICC v9 and GCC 3.2.2 on RH9 (similar to RHEL3), on a Pentium III. I accept that this is arguably not up to date WRT CPU and distribution, but for starters GCC still hasn't got production quality vectorization as of the last time I checked the docs.
I found a mention in the release notes that adding -lirc to ld line resolves dependency, but that doesn't seem to work for the kernel. It is also suggested to replace ld with icc for linking, but ICC doesn't seem to understand the -m linker flag. I'm not sure if omitting -m elf_i386 is OK or not, but either way, after that the -e/-entry flag isn't understood by icc. Is there an equivalent option on ICC to set the symbol for the execution start?
And, why does compiling with -march=pentium3 not throw up the missing _intel_fast_memcpy symbol? Chanking -march=i686 to -march=pentium3 seems to make that particular problem go away. With -march=pentium3 it compiles and links, and boots right up to detecting the 1st CPU, but then locks up solid.
Can you suggest a work-around patch regarding what you mentioned about the header files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For best performance I would suggest changing to another Linux distribution, namely Gentoo.
After that, reading this HOWTO ICC and Portage would be a next logical step.
What I really wonder however, is why Intel doesn't work closely with Linux kernel folks to make kernel compileable with Intel C++ Compiler out of the box. Surely that would be beneficial to Intel?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think there are some later patches for 2.6.x, but nothing particularly current.
No idea why this was dropped...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also try this patch from pyrillion.org. It is meant for 2.6.5 and 2.6.6 kernels but you may be able to adapt it provided you know kernel structure good enough.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In addition, we have a white paper that talks about building the Linux kernel at http://download.intel.com/support/performancetools/c/linux/sb/linuxkernelbuildwhitepaper.pdf
Best regards,
_|ohnO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please try to add this compiler option -fno-builtin. If this doesn't work, try to link libirc_s.a to the kernel image by modifying the makefile in the root directory of the Linux kernel. For example,
@@ -600,7 +600,7 @@
quiet_cmd_vmlinux__ ?= LD $@
cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@
-T $(vmlinux-lds) $(vmlinux-init)
- --start-group $(vmlinux-main) --end-group
+ --start-group $(vmlinux-main) /opt/intel/cc/10.0.025/lib/libirc_s.a --end-group
$(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^)
Regards,
Feilong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page