From: Bart Samwel <bart@samwel.tk>
To: Libor Vanek <libor@conet.cz>
Cc: "Richard B. Johnson" <root@chaos.analogic.com>,
linux-kernel@vger.kernel.org
Subject: Re: Read from file fails
Date: Tue, 04 May 2004 16:31:40 +0200 [thread overview]
Message-ID: <4097A94C.8060403@samwel.tk> (raw)
In-Reply-To: <20040504011957.GA20676@Loki>
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
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-04 14:31 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 [this message]
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
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=4097A94C.8060403@samwel.tk \
--to=bart@samwel.tk \
--cc=libor@conet.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox