public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Clark <michael@metaparadigm.com>
To: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: Libor Vanek <libor@conet.cz>, Bart Samwel <bart@samwel.tk>,
	"Richard B. Johnson" <root@chaos.analogic.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Read from file fails
Date: Wed, 05 May 2004 19:58:03 +0800	[thread overview]
Message-ID: <4098D6CB.5050501@metaparadigm.com> (raw)
In-Reply-To: <200405051354.43397.vda@port.imtp.ilyichevsk.odessa.ua>

On 05/05/04 18:54, Denis Vlasenko wrote:
> On Wednesday 05 May 2004 13:19, Libor Vanek wrote:
> 
>>>Libor Vanek wrote:
>>>
>>>>OK - how can I "notify" userspace process? Signals are "weak" - I need
>>>>to send some data (filename etc.) to process. One solution is "on this
>>>>signal call this syscall and result of this syscall will be data you
>>>>need" - but I'd prefer to handle this in one "action".
>>>
>>>My first thoughts are to make it a blocking call.
>>
>>You mean like:
>>- send signal to user-space process
>>- wait until user-space process pick ups data (filename etc.), creates copy
>>of file (or whatever) and calls another system call that he's finished -
>>let kernel to continue syscall I blocked
>>?
> 
> 
> I think he meant that userspace daemon should do a blocking syscall
> (a read for example). When that returns, daemon knows he has
> something to do.

Much like coda already does IIRC - kernel wakes userspace blocking on a
read to your special device, userspace 'writes' result back to special
device. This was an idea for a generic userspace upcall mechanism
originated by Alan Cox with his psdev circa 2.0/2.2 ?? which formed the
basis of the coda filesystem which does close to what you would want.

I've written a userspace block device driver interface using this
mechanism also (unpublished as of today, not wanting to compete with
nbd and enbd - it is unlike enbd which blocks on an ioctl and far
far simpler.

   http://gort.metaparadigm.com/userblk/

This way to do zero-copy by using mmap on your special device
(which I plan to do for my userspace block device interface).

~mc

  reply	other threads:[~2004-05-05 11:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-03  0:00 Read from file fails Libor Vanek
2004-05-03 13:11 ` Richard B. Johnson
2004-05-03 15:06   ` Libor Vanek
2004-05-04  0:47     ` Richard B. Johnson
2004-05-04  1:19       ` Libor Vanek
2004-05-04 13:49         ` Richard B. Johnson
2004-05-05 10:34           ` Libor Vanek
2004-05-04 14:31         ` Bart Samwel
2004-05-05  9:54           ` Libor Vanek
2004-05-05 10:04             ` Bart Samwel
2004-05-05 10:19               ` Libor Vanek
2004-05-05 10:45                 ` Bart Samwel
2004-05-05 11:22                   ` Libor Vanek
2004-05-05 11:50                     ` Bart Samwel
2004-05-05 10:54                 ` Denis Vlasenko
2004-05-05 11:58                   ` Michael Clark [this message]
2004-05-04 18:45         ` Paulo Marques
2004-05-05  9:47           ` Libor Vanek

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=4098D6CB.5050501@metaparadigm.com \
    --to=michael@metaparadigm.com \
    --cc=bart@samwel.tk \
    --cc=libor@conet.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /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