On Tue, Jan 20, 2015 at 1:35 AM, Felix Miata
If you write one block at all, the remaining 511 will usually be for free.
So, why make a huge effort to avoid writing a few blocks if it's not going to report any benefit?
Huge effort? A few here, a few there. Maybe it doesn't seem so with electrons, but it does consume energy to make them move. Waste not, want not.
I imagine the rewriting will happen anyway unless a program is
carefully crafted not to write to disk. I don't know the culprit, but
I've programmed enough to get a rough idea of how such an update might
work.
diff, for example, needs file inputs. So you need to create a file in
order to compare against the original.
The file cannot be created in /tmp, that would be a security hole
(/tmp can be written by anyone).
If you created an /etc/fstab.new and diffed it, you may hope the
kernel will cache the new file in memory and absorb the write followed
by the unlink, but it's not entirely clear whether something like that
would work when coded into the update procedure. Updating fstab won't
be the only thing in that procedure, and the write cache could very
well get flushed before you unlink.
So, it *is* tricky coming up with a solution to that very specific
problem without introducing either security issues or more unintended
writes.
On Tue, Jan 20, 2015 at 7:18 AM, Stanislav Baiduzhyi
I do not want to raise another flame thread, but just out of curiosity... If you see that as a problem, what kind of use-case are you talking about?
I've just opened 'iotop -o -d 0.5' one one monitor, and using firefox on second monitor. Every page click results in 3-4 seconds of io operations, some special effects, any page refresh.
I did report that for Firefox, it didn't get much attention. It's a performance killer too, since they call fsync every second as well on a timestamp file. Lots of the most prominent filesystems can't handle single-file fsyncs very efficiently. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org