Re: Module vs Kernel main performacne

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

 



I did another experiment.

Wrote a stand alone module and user program which does ioctl and pass
buffer to kernel module.

User program passes a buffer through ioctl and kernel module does
kmalloc on it and calls copy_from_user, kfree and return. Test program
send 120 gigabyte data to module.

If I pass 1k buffer per call, I get

115,396,349,819 instructions              #    0.90  insns per cycle
      [95.00%]

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 cop_from_user is more efficient when copy data is small,
why it is so ?

_______________________________________________
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