Re: Module vs Kernel main performacne

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 30, 2012 at 10:35 PM, Mulyadi Santosa
<mulyadi.santosa@xxxxxxxxx> wrote:
> Hi...
>
> On Thu, May 31, 2012 at 4:44 AM, Abu Rasheda <rcpilot2010@xxxxxxxxx> wrote:
>> as I increase size of buffer, insns per cycle keep decreasing. Here is the data:
>>
>>    1k 0.90  insns per cycle
>>    8k 0.43  insns per cycle
>>  43k 0.18  insns per cycle
>> 100k 0.08  insns per cycle
>>
>> Showing that copy_from_user is more efficient when copy data is small,
>> why it is so ?
>
> you meant, the bigger the buffer, the fewer the instructions, right?

yes

>
> Not sure why, but I am sure it will reach some peak point.
>
> Anyway, you did kmalloc and then kfree()? I think that's why...bigger
> buffer will grab large chunk from slab...and again likely it's
> physically contigous. Also, it will be placed in the same cache line.
>
> Whereas the smaller one....will hit allocate/free cycle more...thus
> flushing the L1/L2 cache even more.

It seems to be doing opposite, bigger the allocation / copy longer stall is.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux