[haiku-development] Re: Haiku R1/alpha updating (was decisions)

  • From: "Donn Cave" <donn@xxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Thu, 7 Aug 2008 15:13:01 -0700 (PDT)

Quoth "Axel =?utf-8?q?D=C3=B6rfler?=" <axeld@xxxxxxxxxxxxxxxx>:
...
| What could also cause this is if we are just rewriting the same file 
| instead of replacing it. "cp" for example just does that - in this 
| case, code that isn't currently paged in will see the new binary 
| whenever it gets there. Linux has the same problem, btw.
| So we could either change our build system to properly replace the 
| files (ie. by passing the --remove-destination option to it, in case it 
| supports that), or let the VM handle this case gracefully (see MAP=5FCOPY 
| for more info: http://www.ussg.iu.edu/hypermail/linux/kernel/0110.1/1506.html 
| - in case you want to have a good read). Despite Linus' slight aversion 
| against MAP=5FCOPY, I think this would actually be the preferred method 
| (but for executables; I agree it doesn't really make sense as a 
| replacement for read()).

I skimmed that thread, and came away with the impression that at least on
Linux, VM is not a perfect place to solve this kind of problem, and instead
you might look at the filesystem - some kind of copy-on-write mirroring.
This would work even when the old system is mapping files AFTER the update
has started.

I would be happy to explain what I mean by that, but for the very simplest
thing, though, would it work to unpack to /boot/beos-new/, and rename that
/boot/beos/ during shutdown?  This would be hard on 3rd party applications
that install or update files in /boot/beos, but that ought to be discouraged
anyway.

        Donn

Other related posts: