From: p.jaroszynski@gmail.com (Piotr Jaroszyński)
To: kernelnewbies@lists.kernelnewbies.org
Subject: cudaram - a block device exposing nvidia gpus ram implemented with cuda
Date: Tue, 1 Mar 2011 23:41:18 +0100 [thread overview]
Message-ID: <AANLkTinN8bt0MeSYf1kQcZcemdqaB9O_Z9oJ4PkrVNNc@mail.gmail.com> (raw)
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
reply other threads:[~2011-03-01 22:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinN8bt0MeSYf1kQcZcemdqaB9O_Z9oJ4PkrVNNc@mail.gmail.com \
--to=p.jaroszynski@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).