create a kernel buffer from user-level

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

 



I am doing a project related to thread scheduling. This project needs communication between kernel and user-level applications. Basically, the user-level application sets or unset a bit in a bit vector, according to the application's status (this part is not related to this question, so I skip it). Then the kernel reads the bit vector everytime it schedules a thread. 

My question is where to allocate the bit vector.

1. If I allocate the bit vector in user-level, then everytime the kernel wants to read the bit vector, I has to do a copy_from_user(). I tried this solution, this incurs a lot of overhead and also crash the os. Since the copy_from_user() needs to look up the virtual address which corresponds to the starting address of bit-vector, it will cause paging in the middle of scheduling. Is there any other way that the kernel can directly access user-level space without doing copying and address translation?

2. If I allocate the bit vector directly in the kernel space. How can I do this? Is it possible to create an extra system call that allows user-level program to allocate a kernel buffer?

Could anyone help me out on this? Thanks!

--
Addr: 1025N, 23rd str, APT 33,
        Lincoln, NE, 68503
Phone: (402)310-9826
WWW: cse.unl.edu/~fxian
_______________________________________________
Fedora-kernel-list mailing list
Fedora-kernel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-kernel-list

[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux