linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* taskfs and kernfs
@ 2000-11-05  9:23 Dave Zarzycki
  2000-11-05 17:26 ` Alexander Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Zarzycki @ 2000-11-05  9:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Viro

I got bored this evening and decided to learn more about the Linux kernel
by splitting out procfs into two separate file systems:

taskfs which contains /proc/self and /proc/[1-9]*
kernfs which contains everything else that procfs provides.

You can get the quick hack from here (this patch is against 2.4.0-test10):

http://thor.sbay.org/~dave/taskfs_and_kernfs.diff.gz

I've tested the two file systems on the user-mode-linux kernel. :-)
They both seem to work as expected, even when /proc is mounted.

Alexander Viro, is this kernfs at all useful as a starting point for your
kernfs goals?

davez

-- 
Dave Zarzycki
http://thor.sbay.org/~dave/



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: taskfs and kernfs
  2000-11-05  9:23 taskfs and kernfs Dave Zarzycki
@ 2000-11-05 17:26 ` Alexander Viro
  2000-11-05 19:37   ` Dave Zarzycki
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Viro @ 2000-11-05 17:26 UTC (permalink / raw)
  To: Dave Zarzycki; +Cc: linux-kernel



On Sun, 5 Nov 2000, Dave Zarzycki wrote:

> I got bored this evening and decided to learn more about the Linux kernel
> by splitting out procfs into two separate file systems:
> 
> taskfs which contains /proc/self and /proc/[1-9]*
> kernfs which contains everything else that procfs provides.
> 
> You can get the quick hack from here (this patch is against 2.4.0-test10):
> 
> http://thor.sbay.org/~dave/taskfs_and_kernfs.diff.gz
> 
> I've tested the two file systems on the user-mode-linux kernel. :-)
> They both seem to work as expected, even when /proc is mounted.
> 
> Alexander Viro, is this kernfs at all useful as a starting point for your
> kernfs goals?

Not really. Sure, splitting procfs-proper (per-process stuff) is a nice
thing, but it's hardly a real problem. All preliminary work for that
had been done about a year ago - base.c and array.c vs. everything else.

The reason why this splitup didn't happen yet is the lack of union-mount.
IOW, we can split them, but we will not be able to preserve the namespace.
Union-mount is a 2.5 stuff - involves credentials cache and change of
->readdir() prototype, so freeze is not a time for that.

However, kernfs is _not_ procfs \setminus procfs-proper. It's our current
/proc/sys. And here we have an interesting set of problems due to the way
it is populated and accessed. We have sysctl(2) to deal with, we have
static initializers for sysctl tables and we have rather odd combination of
three tree-like structures: dcache tree, proc_dir_entry tree and list
of trees consisting of ctl_table. That's where the problems are. And yes, once
kernfs is split off the rest of procfs \setminus procfs-proper will become
much simpler. Sigh..

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: taskfs and kernfs
  2000-11-05 17:26 ` Alexander Viro
@ 2000-11-05 19:37   ` Dave Zarzycki
  2000-11-05 19:48     ` Alexander Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Zarzycki @ 2000-11-05 19:37 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-kernel

On Sun, 5 Nov 2000, Alexander Viro wrote:

> However, kernfs is _not_ procfs \setminus procfs-proper. It's our current
> /proc/sys.

Okay. I didn't realize that's what you had in mind when you wrote
"kernfs." Mind if I ask why you didn't call it "sysctlfs" or "sysfs?"

In you earlier e-mail, you suggested that sysctl(2) would use path_walk().
Would that mean that your kernfs would have to be loaded into the kernel
and mounted for sysctl(2) to work? Or am I missing something obvious?

davez

-- 
Dave Zarzycki
http://thor.sbay.org/~dave/









-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: taskfs and kernfs
  2000-11-05 19:37   ` Dave Zarzycki
@ 2000-11-05 19:48     ` Alexander Viro
  2000-12-18 20:51       ` Albert D. Cahalan
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Viro @ 2000-11-05 19:48 UTC (permalink / raw)
  To: Dave Zarzycki; +Cc: linux-kernel



On Sun, 5 Nov 2000, Dave Zarzycki wrote:

> On Sun, 5 Nov 2000, Alexander Viro wrote:
> 
> > However, kernfs is _not_ procfs \setminus procfs-proper. It's our current
> > /proc/sys.
> 
> Okay. I didn't realize that's what you had in mind when you wrote
> "kernfs." Mind if I ask why you didn't call it "sysctlfs" or "sysfs?"

Check *BSD.

> In you earlier e-mail, you suggested that sysctl(2) would use path_walk().
> Would that mean that your kernfs would have to be loaded into the kernel
> and mounted for sysctl(2) to work? Or am I missing something obvious?

Yes. No. Yes.

It doesn't have to be mounted anywhere - we need only dentry tree and some
struct vfsmount to use path_walk(). Said vfsmount doesn't have to be anywhere
near the mount tree.

As for the "loaded in the kernel" - at that point the source of fs-related
part is ~12Kb and sysctl.c is seriously trimmed (sysctl tree traversal is
gone). Moreover, it's going to shrink more when we go for pure dcache variant.
IOW, there is no point in making it modular - no more than doing modular
CONFIG_SYSCTL in the current setup.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: taskfs and kernfs
  2000-11-05 19:48     ` Alexander Viro
@ 2000-12-18 20:51       ` Albert D. Cahalan
  0 siblings, 0 replies; 5+ messages in thread
From: Albert D. Cahalan @ 2000-12-18 20:51 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Dave Zarzycki, linux-kernel

Alexander Viro writes:
> On Sun, 5 Nov 2000, Dave Zarzycki wrote:
>> On Sun, 5 Nov 2000, Alexander Viro wrote:
>>
>>> However, kernfs is _not_ procfs \setminus procfs-proper. It's our current
>>> /proc/sys.
>>
>> Okay. I didn't realize that's what you had in mind when you wrote
>> "kernfs." Mind if I ask why you didn't call it "sysctlfs" or "sysfs?"
>
> Check *BSD.

Meanwhile, the FreeBSD people seem to be about to junk kernfs.
One is supposed to use sysctl. (freebsd-hackers or freebsd-arch
just this week)

I didn't know penguins went dumpster diving in Satan's trash.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-12-18 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-05  9:23 taskfs and kernfs Dave Zarzycki
2000-11-05 17:26 ` Alexander Viro
2000-11-05 19:37   ` Dave Zarzycki
2000-11-05 19:48     ` Alexander Viro
2000-12-18 20:51       ` Albert D. Cahalan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).