From: Jody Pearson <jody.pearson@cern.ch>
To: root@chaos.analogic.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Documentation / code sample wanted.
Date: Tue, 03 Jun 2003 12:38:05 +0200 [thread overview]
Message-ID: <3EDC7A8D.9080702@cern.ch> (raw)
In-Reply-To: Pine.LNX.4.53.0306021409080.17768@chaos
Hi Dick, All,
>
>This has become a FAQ, probably because people
>don't know what a kernel is. They think it's
>just some 'C' code in which you can do anything
>the 'C' compiler lets you do.
>
>
In this case, I was being stupid with the gethostbyname exmaple. But I
do know what a kernel is !
To fill in the blanks, I am writing a network based filesystem, and I
now realise that the place to do the gethostbyname() is in a mount helper.
>Important! The kernel is not a 'task' it doesn't
>have a context. Everything it has been designed
>to do, is to perform systematic tasks upon behalf
>of the caller, calling from user-mode context.
>When it is executing, it is executing upon behalf
>of a user-mode task. It is doing what the user-mode
>task doesn't know how, or isn't trusted, to do.
>
What I would like to achive is a self-contained module which implements
a filesystem. The user-space apps then interact with the fs as normal.
I am trying to avoid havng "helper daemons" for various reasons, too
long to go into here
>
>The only thing that can call the kernel and
>successfully accomplish what it intended to do, is
>a user-mode task. Therefore, if you want to call
>the kernel, you do it from a user-mode program.
>It's just that simple.
>
And if your a filesystem ? Is it really recommended to do;
userspace->kernel->userspace->kernel->userspace ? That seems like a lot
of context switching to me.
>
>You do this, by creating a user-mode daemon that
>sleeps in select() or poll() until the kernel code
>wakes it,
>
[snip]
As I said, for my own reasons I would like not to have a deamon like this.
Thanks for the help.
Jody
--
Chaos, Panic, Pandemonium... my work here is done.
next prev parent reply other threads:[~2003-06-03 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-02 17:40 Documentation / code sample wanted Jody Pearson
2003-06-02 18:18 ` Richard B. Johnson
2003-06-03 10:38 ` Jody Pearson [this message]
2003-06-02 19:40 ` Alan Cox
2003-06-03 4:10 ` Matt Mackall
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=3EDC7A8D.9080702@cern.ch \
--to=jody.pearson@cern.ch \
--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