Re: Want to know something about mlock or shmctl via SHMLOCK
- From: enrio@xxxxxxxxx
- Date: 24 Dec 2005 23:43:10 -0800
sorcerer skrev:
> I think I will implement this using get_user_pages at last but I will
> always lock the memory in the beginning when the system starts. I ever
> implemeted memory copy between two processes using get_user_pages
> (in fact, I used it as process_cond_broadcast).
I don't understand what you are trying to do in your kernel module.
You seem to want the module to get at the data sent, fast. But what
will you then do with the data?
>>From what you say it sounds like you will just pass the data on to
another process, which will be waiting for it, or possibly first
ensuring somehow that the other process is "ready for it".
But what about using shared memory in the two processes? If the amount
of data is large, isn't shared memory the fastest? That would be copy
once - to the shared memory. Or rather, generate once - in the shared
memory?
Then what more you need is synchronization. What about using a futex?
> And I doubt what I
> implemented is buggy since I am no linux VMM expert.
You mean you doubt it is free of bugs? (I fail to see how being "no
linux VMM expert" helps avoiding bugs.) Or did I miss something?
> I did not take the
> reference of ptrace.c while I implemented that.
Sorry, what do you mean?
-Enrique
.
- Follow-Ups:
- Re: Want to know something about mlock or shmctl via SHMLOCK
- From: sorcerer
- Re: Want to know something about mlock or shmctl via SHMLOCK
- References:
- Want to know something about mlock or shmctl via SHMLOCK
- From: sorcerer
- Re: Want to know something about mlock or shmctl via SHMLOCK
- From: sorcerer
- Want to know something about mlock or shmctl via SHMLOCK
- Prev by Date: Re: Wanted: serial driver (RS232) emulation on LAN
- Next by Date: Re: Want to know something about mlock or shmctl via SHMLOCK
- Previous by thread: Re: Want to know something about mlock or shmctl via SHMLOCK
- Next by thread: Re: Want to know something about mlock or shmctl via SHMLOCK
- Index(es):
Relevant Pages
|