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

Eliot Miranda eliot.miranda at gmail.com
Sat May 21 18:02:51 UTC 2016


Hi Tim,

On Sat, May 21, 2016 at 10:49 AM, tim Rowledge <tim at rowledge.org> wrote:

> The issue here is that the PI - especially when used in schools - is
> storing everything on a micro-SD card. Being surrounded by kids is a scary
> thing for a computer. They don’t necessarily bother to do a nice system
> shutdown or even exit Scratch before yanking the power. Teachers don’t
> necessarily know to tell them to; lots of people doing their best with
> insufficient knowledge.
>
> An interesting thing is that I ‘remembered’ that we flush files when
> closing them but in fact we don’t. The file flush primitive is barely used,
> so far as I can only really for stdio flushing. So adding a fsync call to
> the flush primitive would barely affect anything and I’d have to amend the
> Scratch file writing code to use it.
>
> Is anyone using code that regularly flushes filestreams and might have a
> performance issue if an fsync were added?
>

Well, the case is that it /is/ a performance issue.  Writing to disc is way
more expensive than flushing to kernel buffers.  How about saying what you
think about my c) and d) options?  That's a way of avoiding the performance
issue and solving the kids-are-humans issue.

tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: BOMB: Burn Out Memory Banks
>

_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160521/808c25fb/attachment.htm


More information about the Squeak-dev mailing list