Wednesday, 25 June 2014

Re: Disc cache worth it?

On Wed, Jun 25, 2014 at 12:14:16PM +0100, george greenfield wrote:
> In message <20140624211245.GM1754@platypus.pepperfish.net>
> Rob Kendrick <rjek@netsurf-browser.org> wrote:
>
> > On Tue, Jun 24, 2014 at 06:36:18PM +0100, Chris Young wrote:
> >>
> >> It would be interesting to see if a Raspberry Pi running the GTK
> >> version from SD card has the same slowness.
> >
> > Assuming you were running it on one of the flavours of UNIX available
> > for it (Linux, NetBSD), then no.
> >
> > These operating systems receive the write requests from applications and
> > queue them for writing to underlying block devices in the background,
> > while other apps sit there waiting for input or idling. Under RISC OS,
> > file system writes stop /everthing/ until they complete.
>
> Does that mean that selecting 'Make file operations multitask' in
> !Configure-Filer, actually doesn't?

It means that it writes smaller chunks and calls Wimp_Poll in between them
to give other applications a chance, at the expense of expediency. The
whole system stops while the individual chunks are written, being
accepted by FileSwitch, which then in turn passes them to the handling
file system (most likely FileCore), which then hands them to the block
device driver (ADFS, IDEFS, SDFS, etc), percolating the success/failure
result back up the stack to the application.

On other operating systems (UNIX, Windows, BeOS, AmigaOS, OS X), the
equivalent of FileSwitch passes the request onto the file system which
then writes the data through a buffering system and thus can return
almost straight away, while a background process in the kernel then
flushes the buffer to the block device while the system is not busy, or
a timeout expires. During this process, reads are satisfied through the
buffer because they've not yet reached the block device.

There is some functionality in Vince's disc cache work to allow for
something similar to the "file operations multitask" option, and may
need tuning. As he said, this is an experimental feature and the
feedback that has been happening does have some value.

B.

No comments:

Post a Comment