> > The other option of allocation of kernel buffer and exporting the data to the user
> > using mmap using MAP_PRIVATE will never work.
>
> Why would you use mmap private for this ?
In case of ISR's wanting to access the user area, one should map as MAP_SHARED.
So the kernel mapping and mmap to user will work.
But i am assuming some applications say of a "msg" driven system.
I will receive data thru another machine on the cluster to a kernel buffer, which i will
want to map as MAP_PRIVATE. This is for the following reason. In these kind-of cases
i'll look at the validity of data and want to resend this data or the COW'ed data back
to the sender.
The options for the user will then be :
1.
a) Do another kernel buffer allocation.
b) mmap it to the user.
c) copy the changed data to this new user address which was a mmap of this different
kernel buffer allocation and send it across.
2.
a) Do a mmap ( MAP_PRIVATE ) on the receipt of data itself.
b) export this user area to kernel using a kernel mapping created for the pages
for this COW'ed data, which i can then send it over to the sender.
This way i'll cut down on the copy involved in case #1.
thanks,
Rama.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/