Module vs Kernel main performacne

Mulyadi Santosa mulyadi.santosa at gmail.com
Wed May 30 00:18:55 EDT 2012


Hi...

On Wed, May 30, 2012 at 6:50 AM, Abu Rasheda <rcpilot2010 at gmail.com> wrote:
> So obviously, CPU is stalling when it is copying data and there are
> more cache misses. My question is, is there a difference calling
> copy_from_user from kernel proper compared to calling from LKM ?

Theoritically, it should be the same. However, one thing that might
interest you is that the fact that linux kernel module memory area is
prepared through vmalloc(), thus there is a chance they are not
physically contigous...whereas the main kernel image are using
page_alloc() IIRC thus physically contigous.

What I meant here is, there must be difference speed when you copy
onto something contigous vs non contigous. IIRC at least it will waste
some portion of L1/L2 cache.

Just my 2 cents, maybe I am wrong somewhere...


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list