From 0cd321c45aea93ea9bbf2821c2b81a45a9124f8b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 28 Mar 2011 10:30:54 +0200 Subject: Move a bunch of IRC discussion logs to discussion subpages. --- hurd/translator/tmpfs/discussion.mdwn | 17 ++++ hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn | 121 +++++++++++++++++++-------- 2 files changed, 102 insertions(+), 36 deletions(-) create mode 100644 hurd/translator/tmpfs/discussion.mdwn (limited to 'hurd/translator/tmpfs') diff --git a/hurd/translator/tmpfs/discussion.mdwn b/hurd/translator/tmpfs/discussion.mdwn new file mode 100644 index 00000000..d7a08491 --- /dev/null +++ b/hurd/translator/tmpfs/discussion.mdwn @@ -0,0 +1,17 @@ +[[!meta copyright="Copyright © 2011 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_hurd]] + + * [[notes_bing]] + + * [[notes_various]] + + * [[tmpfs_vs_defpager]] diff --git a/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn b/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn index ef041a23..f0eb473c 100644 --- a/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn +++ b/hurd/translator/tmpfs/tmpfs_vs_defpager.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2010, 2011 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 @@ -8,9 +8,12 @@ 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_hurd]] + \#hurd, freenode, 2010 - humm... why does tmpfs try to use the default pager? that's a bad idea, and probably will never work correctly... + humm... why does tmpfs try to use the default pager? that's a bad + idea, and probably will never work correctly... * slpz is thinking about old issues tmpfs should create its own pagers, just like ext2fs, storeio... slopez@slp-hurd:~$ settrans -a tmp /hurd/tmpfs 10M @@ -21,53 +24,99 @@ License|/fdl]]."]]"""]] :-) slpz: woo you fixed it? pochu: well, it's WIP, but reading/writing works... - I've replaced the use of default pager for the standard pager creation mechanism - slpz: err... how is it supposed to use swap space if not using the default pager? - slpz: or do you mean that it should act as a proxy, just allocating anonymous memory (backed by the default pager) itself? - antrik: the kernel uses the default pager if the application pager isn't responsive enough - antrik: it will just create memory objects and provide zerofilled pages when requested by the kernel (after a page fault) - youpi: that makes sense I guess... but how is that relevant to the question at hand?... + I've replaced the use of default pager for the standard pager + creation mechanism + slpz: err... how is it supposed to use swap space if not using the + default pager? + slpz: or do you mean that it should act as a proxy, just + allocating anonymous memory (backed by the default pager) itself? + antrik: the kernel uses the default pager if the application pager + isn't responsive enough + antrik: it will just create memory objects and provide zerofilled + pages when requested by the kernel (after a page fault) + youpi: that makes sense I guess... but how is that relevant to the + question at hand?... antrik: memory objects will contain the data by themselves - antrik: as youpi said, when memory is scarce, GNU Mach will start paging out data from memory objects to the default pager + antrik: as youpi said, when memory is scarce, GNU Mach will start + paging out data from memory objects to the default pager antrik: that's the way in which pages will get into swap space (if needed) - the thing being that the tmpfs pager has a chance to select pages he doesn't care any more about - slpz: well, the point is that instead of writing the pages to a backing store, tmpfs will just keep them in anonymous memory, and let the default pager write them out when there is pressure, right? - youpi: no idea what you are talking about. apparently I still don't really understand this stuff :-( + the thing being that the tmpfs pager has a chance to select pages + he doesn't care any more about + slpz: well, the point is that instead of writing the pages to a + backing store, tmpfs will just keep them in anonymous memory, and let the + default pager write them out when there is pressure, right? + youpi: no idea what you are talking about. apparently I still + don't really understand this stuff :-( ah, but tmpfs doesn't have pages he doesn't care about, does it? - antrik: yes, but the term "anonymous memory" could be a bit confusing. - antrik: in GNU Mach, anonymous memory is backed by a memory object without a pager. In tmpfs, nodes will be allocated in memory objects, and the pager for those memory objects will be tmpfs itself - slpz: hm... I thought anynymous memory is backed by memory objects created from the default pager? - yes, I understand that tmpfs is supposed to be the pager for the objects it provides. they are obviously not anonymoust -- they have inodes in the tmpfs name space - but my understanding so far was that when Mach returns pages to the pager, they end up in anonymous memory allocated to the pager process; and then this pager is responsible for writing them back to the actual backing store + antrik: yes, but the term "anonymous memory" could be a bit + confusing. + antrik: in GNU Mach, anonymous memory is backed by a memory object + without a pager. In tmpfs, nodes will be allocated in memory objects, and + the pager for those memory objects will be tmpfs itself + slpz: hm... I thought anynymous memory is backed by memory objects + created from the default pager? + yes, I understand that tmpfs is supposed to be the pager for the + objects it provides. they are obviously not anonymoust -- they have + inodes in the tmpfs name space + but my understanding so far was that when Mach returns pages to + the pager, they end up in anonymous memory allocated to the pager + process; and then this pager is responsible for writing them back to the + actual backing store am I totally off there?... - (i.e. in my understanding the returned pages do not reside in the actual memory object the pager provides, but in an anonymous memory object) - antrik: you're right. The trick here is, when does Mach return the pages? - antrik: if we set the attribute "can_persist" in a memory object, Mach will keep it until object cache is full or memory is scarce + (i.e. in my understanding the returned pages do not reside in the + actual memory object the pager provides, but in an anonymous memory + object) + antrik: you're right. The trick here is, when does Mach return the + pages? + antrik: if we set the attribute "can_persist" in a memory object, + Mach will keep it until object cache is full or memory is scarce or we change the attributes so it can no longer persist, of course - without a backing store, if Mach starts sending us pages to be written, we're in trouble - so we must do something about it. One option, could be creating another pager and copying the contents between objects. + without a backing store, if Mach starts sending us pages to be + written, we're in trouble + so we must do something about it. One option, could be creating + another pager and copying the contents between objects. another pager? not sure what you mean - BTW, you didn't really say why we can't use the default pager for tmpfs objects :-) - well, there're two problems when using the default pager as backing store for translators - 1) Mach relies on it to do swapping tasks, so meddling with it is not a good idea - 2) There're problems with seqnos when trying to work with the default pager from tasks other the kernel itself + BTW, you didn't really say why we can't use the default pager for + tmpfs objects :-) + well, there're two problems when using the default pager as backing + store for translators + 1) Mach relies on it to do swapping tasks, so meddling with it is + not a good idea + 2) There're problems with seqnos when trying to work with the + default pager from tasks other the kernel itself (probably, the latter could be fixed) - antrik: pager's terminology is a bit confusing. One can also say creating another memory object (though the function in libpager is "pager_create") + antrik: pager's terminology is a bit confusing. One can also say + creating another memory object (though the function in libpager is + "pager_create") not sure why "meddling" with it would be a problem... - and yeah, I was vaguely aware that there is some seqno problem with tmpfs... though so far I didn't really understand what it was about :-) + and yeah, I was vaguely aware that there is some seqno problem + with tmpfs... though so far I didn't really understand what it was about + :-) makes sense now - anyways, AIUI now you are trying to come up with a mechanism where the default pager is not used for tmpfs objects directly, but without making it inefficient? - slpz: still don't understand what you mean by creating another memory object/pager... + anyways, AIUI now you are trying to come up with a mechanism where + the default pager is not used for tmpfs objects directly, but without + making it inefficient? + slpz: still don't understand what you mean by creating another + memory object/pager... (and yeat, the terminology is pretty mixed up even in Mach itself) - antrik: I meant creating another pager, in terms of calling again to libpager's pager_create - slpz: well, I understand what "create another pager" means... I just don't understand what this other pager would be, when you would create it, and what for... + antrik: I meant creating another pager, in terms of calling again to + libpager's pager_create + slpz: well, I understand what "create another pager" means... I + just don't understand what this other pager would be, when you would + create it, and what for... antrik: oh, ok, sorry - antrik: creating another pager it's just a trick to avoid losing information when Mach's objects cache is full, and it decides to purge one of our objects - anyway, IMHO object caching mechanism is obsolete and should be replaced + antrik: creating another pager it's just a trick to avoid losing + information when Mach's objects cache is full, and it decides to purge + one of our objects + anyway, IMHO object caching mechanism is obsolete and should be + replaced I'm writting a comment to bug #28730 which says something about this antrik: just one more thing :-) - if you look at the code, for most time of their lives, anonymous memory objects don't have a pager + if you look at the code, for most time of their lives, anonymous + memory objects don't have a pager not even the default one - only the pageout thread, when the system is running really low on memory, gives them a reference to the default pager by calling vm_object_pager_create + only the pageout thread, when the system is running really low on + memory, gives them a reference to the default pager by calling + vm_object_pager_create this is not really important, but worth noting ;-) -- cgit v1.2.3