tech-kern archive

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

Re: Perform mmap and poll on PUD character devices



On Sat, Sep 10, 2011 at 12:05:53PM +0200, Roger Pau Monn? wrote:
> Hello,
> 
> Thanks for the reply, sometimes I'm so focused in the problem that I
> forget the big picture. PUD is a framework present in NetBSD that
> allows to implement character and block devices in userspace. [1]
> 
> The blktap (?block tap?) userspace toolkit provides a user-level disk
> I/O interface in Xen systems. Its current main application is to
> replace the common loopback driver for file-based images because of
> better performance. The blktap mechanism involves a kernel driver
> running in Dom0 that acts similarly to the existing Xen/Linux blkback
> driver, and a set of associated user-level libraries. Using these
> tools, blktap allows virtual block devices presented to VMs to be
> implemented in userspace and to be backed by raw partitions, files,
> network, etc. [2]

I do not understahd why it is desirable to involve additional context
switches to and from userspace into this data path.

Instead of writing a bunch of fairly dubious page mapping code (by the
way, I think the "loaning" interfaces might be what you need) in the
kernel to support user-space daemons handling various virtual disk
formats, why not put the effort into just doing the various desired
virtual disk formats in-kernel?  It will perform better (it cannot
possibly perform worse) and likely be easier to maintain in the long
run, too.

Thor


Home | Main Index | Thread Index | Old Index