From mboxrd@z Thu Jan 1 00:00:00 1970 From: p.jaroszynski@gmail.com (=?UTF-8?Q?Piotr_Jaroszy=C5=84ski?=) Date: Tue, 1 Mar 2011 23:41:18 +0100 Subject: cudaram - a block device exposing nvidia gpus ram implemented with cuda Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hello, as my first real(silly) linux project I have implemented a block device that can expose the gpu ram available on nvidia cards while not interfering with normal gpu chores. That was achieved by a userspace daemon that uses cuda to manage the gpu ram and a linux kernel module to proxy the I/O requests to it. The longer story is at [1] and the code is at [2]. As I am pretty new to kernel hacking I would really appreciate you looking at the code and pointing out the problems. Apart from that I have a few specific questions: - Can the make_request function (set with blk_queue_make_request) be called from interrupt context? Should I be using spin_lock_irq in it? - see [3] - Is reading a pointer member variable of a struct atomic? - see [4] - Are there any safe ways for userspace and kernel to communicate when handling swapping? E.g. If the userspace is mlockall()ed, is calling a syscall that doesn't sleep safe? [1] - http://blog.piotrj.org/2011/03/cudaram-block-device-exposing-nvidia.html [2] - https://github.com/peper/cudaram [3] - https://github.com/peper/cudaram/blob/master/kmod/cudaram.c#L81 [4] - https://github.com/peper/cudaram/blob/master/kmod/cudaram.c#L420 -- Best Regards Piotr Jaroszy?ski