diff options
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/coding_style.mdwn | 59 | ||||
-rw-r--r-- | hurd/console/discussion.mdwn | 10 | ||||
-rw-r--r-- | hurd/debugging.mdwn | 27 | ||||
-rw-r--r-- | hurd/debugging/rpctrace.mdwn | 4 | ||||
-rw-r--r-- | hurd/translator.mdwn | 2 | ||||
-rw-r--r-- | hurd/translator/auth.mdwn | 13 | ||||
-rw-r--r-- | hurd/translator/firmlink.mdwn | 14 | ||||
-rw-r--r-- | hurd/translator/netio.mdwn | 2 | ||||
-rw-r--r-- | hurd/translator/proc.mdwn | 53 | ||||
-rw-r--r-- | hurd/translator/procfs/jkoenig/discussion.mdwn | 20 | ||||
-rw-r--r-- | hurd/translator/socketio.mdwn | 30 | ||||
-rw-r--r-- | hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn | 129 |
12 files changed, 337 insertions, 26 deletions
diff --git a/hurd/coding_style.mdwn b/hurd/coding_style.mdwn new file mode 100644 index 00000000..cc1e3cf3 --- /dev/null +++ b/hurd/coding_style.mdwn @@ -0,0 +1,59 @@ +[[!meta copyright="Copyright © 2013 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_documentation]] + +Some coding style comments that are specific to Hurd systems. + +[[!toc]] + + +# Freeing Port Rights + +## IRC, freenode, #hurd, 2013-07-01 + + <teythoon> do I have to explicitly free ports in a short lived process like + mount? + <pinotree> better take the habit of doing that anyway + <teythoon> how do I recognize that I have to free something? mig spec? + <braunr> i'd say no + <braunr> mig does it for you + <braunr> gnumach reference manual + <teythoon> not memory, like port rights + <braunr> but no, really, for short lived processes it's ok + <braunr> yes, port rights + <braunr> like memory, you don't free stuff in short lived processes :p + <braunr> mach does it correctly when the task is destroyed + <braunr> but there are two use cases for rights + <braunr> those you create manually + <braunr> and those mig creates for its own purpose + <braunr> ignore those used by mig, they matter only in very specific parts + of glibc and other very low level stuff + <braunr> teythoon: keep in mind that there are two flavours of resources + with port rights + <teythoon> but how do I *know* from looking at say fs.defs that I have to + free anything I get? + <braunr> rights themselves, and the user reference count per right + <braunr> eh, that's complicated + <braunr> in a complete RPC call, you must watch two things usually + <braunr> out of line memory + <braunr> and right references + <braunr> except otherwise mentioned, you don't have to free anything + <braunr> freeing passed memory should be obvious (e.g. "out" keyword on a + memory range) + <braunr> for right references, it's less obvious + <braunr> refer to the mach server writing guide i guess + <teythoon> what does the dealloc qualifier do in mig defs? + <braunr> basically, send rights can be created from a receive right + (make_send), or another send right (copy_send) + <braunr> it tells mig which function to call once an RPC has returned + <braunr> all this is described in the mach server writing guide + <braunr> and it's tricky + <braunr> quite error-prone so check with portinfo diff --git a/hurd/console/discussion.mdwn b/hurd/console/discussion.mdwn index f887d826..0022ec23 100644 --- a/hurd/console/discussion.mdwn +++ b/hurd/console/discussion.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -10,6 +10,8 @@ License|/fdl]]."]]"""]] [[!tag open_issue_documentation]] +[[!toc]] + # IRC, OFTC, #debian-hurd, 2012-09-24 @@ -40,3 +42,9 @@ License|/fdl]]."]]"""]] hacking? <allesa> to fix that is… <youpi> some hacking yes + + +# IRC, freenode, #hurd, 2013-07-10 + + <pinotree> http://xkbcommon.org/ ¡û sounds interesting for our console + translator diff --git a/hurd/debugging.mdwn b/hurd/debugging.mdwn index f4b5eba5..ae9b7bef 100644 --- a/hurd/debugging.mdwn +++ b/hurd/debugging.mdwn @@ -26,3 +26,30 @@ License|/fdl]]."]]"""]] * [[glibc]] * [[translator]]s * [[trap_in_the_kernel]] + + +# IRC, freenode, #hurd, 2013-06-30 + + <hacklu> braunr: I don't understand your question totally, but I want to + know how do you do this inspecting? <braunr> i have a small test program + that creates a thread, and inspect its state before any thread dies + <braunr> i use portinfo + <braunr> and rpctrace + <braunr> (there is also vminfo but you're not likely to need it for what + you're doing right now) + <hacklu> I have used rpctrace before, but portinfo, I will try it. + <hacklu> is portinfo show a process's all port use log? + <braunr> not log + <braunr> current state + <hacklu> dump the port name space? + <braunr> yes + <hacklu> I found some names are not continuous. how this come out? + <braunr> continuous ? + <hacklu> 101:send 103:send + <hacklu> missing 102 + <braunr> some are freed + <braunr> a lot actually + <braunr> every RPC needs a reply port + <braunr> a temporary receive right to get replies from servers + <hacklu> so we can reuse the name which are freed before + <braunr> of course diff --git a/hurd/debugging/rpctrace.mdwn b/hurd/debugging/rpctrace.mdwn index a5c1a6e9..1570df4c 100644 --- a/hurd/debugging/rpctrace.mdwn +++ b/hurd/debugging/rpctrace.mdwn @@ -182,6 +182,10 @@ See `rpctrace --help` about how to use it. <youpi> uhu, there's a TODO just above that assertion :) +* IRC, freenode, #hurd, 2013-07-05 + + <pinotree> wish: make rpctrace decode the results of io_stat rpcs + # See Also diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index d4eaf950..37dac794 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -90,6 +90,7 @@ The [[concept|concepts]] of translators creates its own problems, too: * [[hello]] * [[auth]] * [[exec]] +* [[proc]] * [[pfinet]] * [[pflocal]] * [[hostmux]] @@ -112,6 +113,7 @@ The [[concept|concepts]] of translators creates its own problems, too: * [[procfs]] * [[nsmux]] * [[netio]] +* [[socketio]] * [[tarfs]] * [[gopherfs]] * [[smbfs]] diff --git a/hurd/translator/auth.mdwn b/hurd/translator/auth.mdwn index d9e70ec2..7fd4832c 100644 --- a/hurd/translator/auth.mdwn +++ b/hurd/translator/auth.mdwn @@ -1,12 +1,19 @@ -[[!meta copyright="Copyright © 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2008, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU Free Documentation License|/fdl]]."]]"""]] +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +The *auth server* (or, *authentification server*). + +It is stated by `/hurd/init`. + + +# Documentation [[*The_Authentication_Server*|documentation/auth]], the transcript of a talk about the details of the authentication mechanisms in the Hurd by Wolfgang diff --git a/hurd/translator/firmlink.mdwn b/hurd/translator/firmlink.mdwn index 038879db..b53396b0 100644 --- a/hurd/translator/firmlink.mdwn +++ b/hurd/translator/firmlink.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -20,3 +20,15 @@ License|/fdl]]."]]"""]] <braunr> infinity0: firmlinks <infinity0> ah thanks i'll look that up <kilobug> braunr: oh, true, I forgot about that one + + +# Open Issues + + * [[!GNU_Savannah_bug 29809]] + + * IRC, freenode, #hurd, 2013-07-07 + + <youpi> ok, found the firmlink-mv issue + <youpi> will commit that + <pinotree> \o/ + <youpi> (bit of mach_print in translators, took just a few hours) diff --git a/hurd/translator/netio.mdwn b/hurd/translator/netio.mdwn index 44c35cf1..429072d4 100644 --- a/hurd/translator/netio.mdwn +++ b/hurd/translator/netio.mdwn @@ -11,6 +11,8 @@ License|/fdl]]."]]"""]] `netio` is a translator designed for creating socket ports through the filesystem. +See also [[socketio]]. + # Source diff --git a/hurd/translator/proc.mdwn b/hurd/translator/proc.mdwn new file mode 100644 index 00000000..98940f87 --- /dev/null +++ b/hurd/translator/proc.mdwn @@ -0,0 +1,53 @@ +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +The *proc server* (or, *process server*) implements some aspects of [[Unix]] +processes. + +It is stated by `/hurd/init`. + + +# "Unusual" PIDs + +[[!tag open_issue_hurd]] + + +## IRC, freenode, #hurd, 2012-08-10 + + <braunr> too bad the proc server has pid 0 + <braunr> top & co won't show it + + +## IRC, OFTC, #debian-hurd, 2012-09-18 + + <pinotree> youpi: did you see + https://enc.com.au/2012/09/careful-with-pids/' + <pinotree> ? + <youpi> nope + + +## IRC, OFTC, #debian-hurd, 2013-06-23 + + <teythoon> I've got this idea about the pid 1 issue you mentioned + <teythoon> can't we just make init pid 1? + <teythoon> I mean the mapping is rather arbitrary, we could make our init + pid 2 or something and start sysvs init as pid 1 + <pinotree> not totally sure it is that arbitrary up to the first 4-5 pids + <teythoon> y is that? + <pinotree> at least i see in hurd's code that /hurd/init is assumed as + pid=1 + <teythoon> hurds init that has to stick around for the fs translator sync? + <pinotree> hurd's init does the basic server startup + <pinotree> iirc it also takes care of shutdown/reboot + <teythoon> that's what I meant + <teythoon> and if it wouldn't have to stick around for the translator sync + it could just exec sysvinit + <teythoon> I just think it's easier to patch hurd than to remove the + assumption that init is pid 1 from sysvinit diff --git a/hurd/translator/procfs/jkoenig/discussion.mdwn b/hurd/translator/procfs/jkoenig/discussion.mdwn index 197461b8..fcda453e 100644 --- a/hurd/translator/procfs/jkoenig/discussion.mdwn +++ b/hurd/translator/procfs/jkoenig/discussion.mdwn @@ -441,26 +441,6 @@ Needed by glibc's `pldd` tool (commit on "internal" (but exported) glibc functions -# "Unusual" PIDs - -Not actually related to procfs, but here seems to be a convenient place for -filing these: - - -## IRC, freenode, #hurd, 2012-08-10 - - <braunr> too bad the proc server has pid 0 - <braunr> top & co won't show it - - -## IRC, OFTC, #debian-hurd, 2012-09-18 - - <pinotree> youpi: did you see - https://enc.com.au/2012/09/careful-with-pids/' - <pinotree> ? - <youpi> nope - - # CPU Usage ## IRC, freenode, #hurd, 2013-01-30 diff --git a/hurd/translator/socketio.mdwn b/hurd/translator/socketio.mdwn new file mode 100644 index 00000000..479d5749 --- /dev/null +++ b/hurd/translator/socketio.mdwn @@ -0,0 +1,30 @@ +[[!meta copyright="Copyright © 2010, 2013 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +`socketio` is a translator designed for creating socket ports through the +filesystem. + +See also [[netio]]. + + +# IRC, freenode, #hurd, 2013-06-30 + + <youpi> http://lists.gnu.org/archive/html/bug-hurd/2003-05/msg00069.html + <youpi> this was supposed to be much better than our current netio + <youpi> (which doesn't really have any documentation btw) + <teythoon> + http://web.archive.org/web/20060117085538/http://duesseldorf.ccc.de/~moritz/files/socketio.c.gz + <teythoon> youpi: socketio looks nice. any reason in particular why you are + working on it? + <youpi> teythoon: I was looking at the firewall stuff, and wondering about + Zheng Da's work, and seen netio, thus wondered "what is it about + already?" and found there was no documentation, so dug into the mailing + list archives, only to find it was supposed to be precated in favour of + socketio, etc. :) diff --git a/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn b/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn index 5228515f..16a23405 100644 --- a/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn +++ b/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2010, 2011 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2010, 2011, 2013 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -270,3 +271,129 @@ See also: [[open_issues/resource_management_problems/pagers]]. <antrik> only problem is that the current defpager implementation can't really handle that... <antrik> at least that's my understanding of the situation + + +# IRC, freenode, #hurd, 2013-07-05 + + <teythoon> btw, why does the tmpfs translator have to talk to the pager? + <teythoon> to get more control about how the memory is paged out? + <teythoon> read lot's of irc logs about tmpfs on the wiki, but I couldn't + find the answer to that + <mcsim> teythoon: did you read this? + http://www.gnu.org/software/hurd/hurd/translator/tmpfs/tmpfs_vs_defpager.html + <teythoon> mcsim: I did + <mcsim> teythoon: Last discussion, i think has very good point. + <mcsim> To provide memory objects you should implement pager interface + <mcsim> And if you implement pager interface you are the one who is asked + to write data to backing storage to evict them + <mcsim> But tmpfs doesn't do this + <teythoon> mmm, clients doing mmap... + <mcsim> teythoon: You don't have mmap + <mcsim> teythoon: mmap is implemented on top of mach interface + <mcsim> teythoon: I mean you don't have mmap at this level + <teythoon> mcsim: sure, but that's close enough for me at this point + <mcsim> teythoon: diskfs interface requires implementor to provide a memory + object port (send right) + <mcsim> Guest8183: Why tmpfs requires defpager + <Guest8183> how did you get to talk about that ? + <mcsim> I was just asked + <teythoon> Guest8183: it's just so unsettling that tmpfs has to be started + as root :/ + <Guest8183> teythoon: why ? + *** Guest8183 (~rbraun@dalaran.sceen.net) is now known as braunr_ + <teythoon> braunr_: b/c starting translators isn't a privileged operation, + and starting a tmpfs translator that doesn't even access any device but + "just" memory shouldn't require any special privileges as well imho + <teythoon> so why is tmpfs not based on say libnetfs? b/c it is used for + d-i and someone (apt?) mmaps stuff? + <pinotree> being libdiskfs-based isn't much the issue, iirc + <pinotree> http://lists.gnu.org/archive/html/bug-hurd/2013-03/msg00014.html + too + <kilobug> teythoon: AFAIK apt uses mmap, yes + <braunr_> teythoon: right + <braunr_> a ramfs is actually tricky to implement well + <mcsim> braunr_: What do you mean under "to implement well"? + <braunr_> as efficiently as possible + <braunr_> i.e. being as close as possible to the page cache for minimum + overhead + <mcsim> braunr: AFAIK ramfs should not use swap partition, so page cache + shouldn't be relevant for it. + <braunr> i'm talking about a ramfs in general + <braunr> not the specific linux ramfs + <braunr> in linux, what they call ramfs is the tiny version of tmpfs that + doesn't use swap + <braunr> i actually don't like "tmpfs" much + <braunr> memfs may be more appropriate + <braunr> anyway + <mcsim> braunr: I see. And do you consider defpager variant as "close as + possible to the page cache"? + <braunr> not far at least + <braunr> if we were able to use it for memory obects, it would be nice + <braunr> but defpager only gets attached to objects when they're evicted + <braunr> before that, anonymous (or temporary, in mach terminology) objects + have no backing store + <braunr> this was probably designed without having tmpfs in mind + <braunr> i wonder if it's possible to create a memory object without a + backing store + <mcsim> what should happen to it if kernel decides to evict it? + <braunr> it sets the default pager as its backing store and pushes it out + <mcsim> that's how it works now, but you said "create a memory object + without a backing store" + <braunr> mach can do that + <braunr> i was wondering if we could do that too from userspace + <mcsim> mach does not evict such objects, unless it bound a defpager to + them + <mcsim> but how can you handle this in userspace? + <braunr> i mean, create a memory object with a null control port + <braunr> mcsim: is that clearer ? + <mcsim> suppose you create such object, how kernel will evict it if kernel + does not know who is responsible for eviction of this object? + <braunr> it does + <braunr> 16:41 < braunr> it sets the default pager as its backing store and + pushes it out + <braunr> that's how i intend to do it on x15 at least + <braunr> but it's much simpler there because uvm provides better separation + between anonymous and file memory + <braunr> whereas they're much too similar in mach vm + <mcsim> than what the difference between current situation, when you + explicitly invoke defpager to create object and implicit method you + propose? + <braunr> you don't need a true defpager unless you actually have swap + <mcsim> ok + <mcsim> now I see + <braunr> it also saves the communication overhead when initializing the + object + <mcsim> thank you + <braunr> which may be important since we use ramfs for speed mostly + <mcsim> agree + <braunr> it should also simplify the defpager implementation, since it + would only have a single client, the kernel + <braunr> which may also be important with regard to global design + <braunr> one thing which is in my opinion very wrong with mach is that it + may be a client + <braunr> a well designed distributed system should normally not allow on + component to act as both client and server toward another + <braunr> i.e. the kernel should only be a server, not a client + <braunr> and there should be a well designed server hierarchy to avoid + deadlocks + <braunr> (such as the one we had in libpager because of that) + <mcsim> And how about filesystem? It acts both as server and as client + <braunr> yes + <braunr> but not towards the same other component + <braunr> application -> file system -> kernel + <braunr> no "<->" + <braunr> the qnx documentation explains that quite well + <braunr> let me see if i can find the related description + <mcsim> Basically, I've got your point. And I would rather agree that + kernel should not act as client + <braunr> mcsim: + http://www.qnx.com/developers/docs/6.4.0/neutrino/sys_arch/ipc.html#Robust + <braunr> one way to implement that (and qnx does that too) is to make + pagers act as client only + <braunr> they sleep in the kernel, waiting for a reply + <braunr> and when the kernel needs to evict something, a reply is sent + <braunr> (qnx doesn't actually do that for paging, but it's a general idea) + <mcsim> braunr: how hierarchy of senders is enforced? + <braunr> it's not + <braunr> developers must take care + <braunr> same as locking, be careful about it |