I modified my module (m.c). Still sending buffer from user space using
ioctl, but instead of copying data from buffer provided by user, I have
allocated (kmalloc) a buffer and I copy from this buffer to another kernel
buffer which is allocated each time this module ioclt is invoked.
Hello Abu,
I had to include linux/module.h or an error was issued about THIS_MODULE.
What Kernel version are you using? I'm trying to compile it and I'm
getting the error:
[peter@ace m]$ make
make -C /lib/modules/3.3.7-1.fc17.x86_64/build SUBDIRS=`pwd` modules
make[1]: Entering directory
Hello Abu,
I had to include linux/module.h or an error was issued about
THIS_MODULE.
I am running this tool on Scientific Linux 6.0, which is 2.6.32 kernel. I
know this is old but this is what I have for my product.
What Kernel version are you using? I'm trying to compile it and I'm
Hi again!
On Tue, May 29, 2012 at 8:50 PM, Abu Rasheda rcpilot2...@gmail.com wrote:
Hi,
I am working on x8_64 arch. Profiled (oprofile) Linux kernel module
and notice that whole lot of cycles are spent in copy_from_user call.
I compared same flow from kernel proper and noticed that for more
peter.se...@gmail.com wrote:
Hi again!
Hi
How did you call from Kernel module?
In original code, copied data is dmaed and in experimental code data is
dropped.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
If the buffer at user side is more then a page, then it may be that
complete user space buffer is not available in memory and kernel spend time
in processing page fault
I have attached code for module and user program. If anyone is bored over
the weekend they are welcome to try and explain
On Wed, May 30, 2012 at 10:35 PM, Mulyadi Santosa
mulyadi.sant...@gmail.com wrote:
Hi...
On Thu, May 31, 2012 at 4:44 AM, Abu Rasheda rcpilot2...@gmail.com 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
On May 31, 2012 9:37 PM, Abu Rasheda rcpilot2...@gmail.com wrote:
On Wed, May 30, 2012 at 10:35 PM, Mulyadi Santosa
mulyadi.sant...@gmail.com wrote:
Hi...
On Thu, May 31, 2012 at 4:44 AM, Abu Rasheda rcpilot2...@gmail.com
wrote:
as I increase size of buffer, insns per cycle keep
Hi...
On Wed, May 30, 2012 at 11:51 AM, Abu Rasheda rcpilot2...@gmail.com wrote:
When you say, LKM area is prepared with vmalloc is it for code /
executable you refering too ?
Yes, AFAIK memory area code and static data in linux kernel module is
allocated via vmalloc().
if so will it matter
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
On Wed, May 30, 2012 at 2:44 PM, Abu Rasheda rcpilot2...@gmail.com wrote:
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
Hi...
On Thu, May 31, 2012 at 4:44 AM, Abu Rasheda rcpilot2...@gmail.com 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
Hi,
I am working on x8_64 arch. Profiled (oprofile) Linux kernel module
and notice that whole lot of cycles are spent in copy_from_user call.
I compared same flow from kernel proper and noticed that for more data
through put cycles spent in copy_from_user are much less. Kernel
proper has 1/8
Hi...
On Wed, May 30, 2012 at 6:50 AM, Abu Rasheda rcpilot2...@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,
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.
When you say, LKM area is prepared with vmalloc is it for code /
executable you refering too ? if so will it matter for data
15 matches
Mail list logo