Re: sharing memory map between processes (same parent)



On Wed, 30 Apr 2008 01:10:49 -0700 (PDT) David Schwartz <davids@xxxxxxxxxxxxx> wrote:
| On Apr 28, 10:00 pm, phil-news-nos...@xxxxxxxx wrote:
|
|> I wanted to overlap setting up the mapping with the work already taking place
|> in process B. Much of the work of setting up a mapping (like reading block
|> pointer records for the file) would not need to be repeated in such a transfer,
|> so the time delay in process B to merely accept the mapping from process A
|> means process B can get on to other things more quickly. On a slow machine,
|> it might not be any advantage. On a fast machine, maybe there would be.
|
| I'm betting you didn't measure, so this whole thing is premature
| optimization. In fact, it's premature pessimization since the cost of
| making the mapping is still paid, but added onto that is the cost of
| giving and receiving the mapping.

I plan to measure. But I plan to do that when I have enough alternate ideas
to measure against (if any).


| Transferring the mapping is going to be wildly expensive because it
| requires synchronization. I haven't measured either, but my gut tells
| me this would be a pessimization. It *might* make sense to have the
| other process warm the cache by 'stat'ing the file and maybe even
| reading it, but I doubt even that.

Well, I have concluded that the feature does not exist. I don't know that it
should exist. OTOH, I've seen many features that do exist which I cannot
explain why they would exist (but someone else might have a good explanation).
I really don't understand why the discussion is going down the path of trying
to say why such a feature is not practical to implement. Has someone asked
to have it implemented?

--
|WARNING: Due to extreme spam, I no longer see any articles originating from |
| Google Groups. If you want your postings to be seen by more readers |
| you will need to find a different place to post on Usenet. |
| Phil Howard KA9WGN (email for humans: first name in lower case at ipal.net) |
.



Relevant Pages

  • Re: sharing memory map between processes (same parent)
    ... I wanted to overlap setting up the mapping with the work already taking place ... POSIX_MADV_WILLNEED is the only thing I can see that has any chance of causing I/O other than accessing the pages, and Google suggests that for Linux it will cause already-cached pages to be mapped and decrease the likelihood of the pages being reclaimed, but no I/O. ...
    (comp.unix.programmer)
  • Re: sharing memory map between processes (same parent)
    ... I wanted to overlap setting up the mapping with the work already taking place ... This overhead (as well as the overhead of transferring file descriptors via unix sockets) could be minimized by simply using threads. ...
    (comp.unix.programmer)
  • Re: How to find out which pages were copied-on-write?
    ... application which is doing an mmap on a file as a MAP_PRIVATE mapping. ... The memory area is then handed to a library which may modify some pages. ... > Yet another feature that I could use if it were available: ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Legacy 7
    ... VE Mapping. ... Here is part of a message received from a Millenia Employee! ... To All of you Awesome Legacy Users, ... We did have a plan which we felt was a great plan. ...
    (soc.genealogy.computing)
  • Copying a large file from one machine to another in 2000 Prof
    ... 2.Copy it to machine B by mapping any share folder. ... Is it a bug or implementation ... feature ....?? ...
    (microsoft.public.win2000.general)