AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ?

David T. Lewis lewis at mail.msen.com
Mon May 23 13:35:50 UTC 2016


On Mon, May 23, 2016 at 08:06:21PM +0800, Ben Coman wrote:
> On Mon, May 23, 2016 at 1:33 PM, John Pfersich <smalltalker2 at mac.com> wrote:
> > On a Raspberry Pi, which is what we're talking about, yanking the power unceremoniously crashes the system. The
Pi doesn't even have a power switch. You can shut down the OS before you power it down, but we're talking about a $3
5 computer with virtually no bells and whistles. A kid that yanks the power cord deserves what he or she gets. The r
est of the OS isn't as forgiving.
> >
> > I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosa
ves can be deadly to productivity,
>
> Since IIUC Linux's fork() is copy-on-write, maybe the VM can fork() a
> process to perform the autosave.  That might help avoid an obvious
> pause, however I have no clue how overall performance might be
> affected by the read-only-page-faults that copy the individual pages
> that the ongoing processes write to.
>
> cheers -ben



Do you mean like this?

  UnixProcess class>>saveImageInBackgroundNicely
     "Save image in a background OS process with lowered scheduling priority."

     "UnixProcess saveImageInBackgroundNicely"

     ^ self saveImageInBackground: self uniqueNameForSavedImage nice: true


This has been available for over 10 years, but AFAIK nobody uses it. That
leads me to suspect that aformentioned "deadly threat to productivity" 
may not really be as horrible as previously believed ;-)

Dave
 


More information about the Squeak-dev mailing list