From: Libor Vanek <libor@conet.cz>
To: Bart Samwel <bart@samwel.tk>
Cc: "Richard B. Johnson" <root@chaos.analogic.com>,
linux-kernel@vger.kernel.org
Subject: Re: Read from file fails
Date: Wed, 5 May 2004 11:54:06 +0200 [thread overview]
Message-ID: <20040505095406.GC5767@Loki> (raw)
In-Reply-To: <4097A94C.8060403@samwel.tk>
On Tue, May 04, 2004 at 04:31:40PM +0200, Bart Samwel wrote:
> Libor Vanek wrote:
> >I know that kernel threads work. My question was more like: "I'd
> > like to know, whether writing my module as kernel thread will make
> > it able to read/write files".
> [...]
> >>>I think there are reasons (speed, speed, speed...) why some things
> >>> should be done kernel-space.
>
> Using a kernel thread won't improve speed, because to do anything you
> will have to context-switch to the thread. For the stuff you want to do
> you are probably better off having a tiny kernel module to intercept the
> events that you're interested in, notifying a userspace process to do
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".
> the real work. Yes, it will be slower than in kernel space, but only
> slightly. Especially if you use sendfile from the userspace process. And
> it's also good to remember that Linux is optimized for running user
> space processes as fast as possible. :)
>
> --Bart
next prev parent reply other threads:[~2004-05-05 9:55 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 [this message]
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
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=20040505095406.GC5767@Loki \
--to=libor@conet.cz \
--cc=bart@samwel.tk \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.