gparmer/Composite — pull request #26 by interwq (2012-09-11 02:24:35+00:00)
Title: Multi-core Platform Support

Hi Gabe,

The pull-request is for the multi-core support code I have done. I did the cbuf benchmark and found that the code hurt the uniprocessor performance very little. The invocation cost increases a little bit (~2%), from 810 cycles to 825 cycles on the i7 desktop with uniprocessor Linux host. The cbuf alloc/free/buf2buf doesn't change at all.

Some brief MC function usage:

NUM_CPU (in cos_config.h) the number of cpus defined in the config file.
in the user-level: cos_cpuid() returns current cpu.
in the kernel: get_cpuid() returns current cpu.

Later these probably should be included in a documentation with more detail information.

Please tell me if you find anything need to be modified.

Best,
Qi