Sujet : Re: Shutdown - 25 Years Later
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.os.linux.miscDate : 26. Apr 2025, 17:08:53
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwv8qnmj46i.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
The Natural Philosopher <
tnp@invalid.invalid> writes:
On 25/04/2025 22:20, Carlos E.R. wrote:
Yes it can. It uses algorithms I previously mentioned -- scatter read,
gather write, elevator seeking -- to assemble together large sequences of
I/O requests, larger than any on-drive cache can handle.
No, it can not. It does not have the access.
>
For SSD, no. SSD is a device that mimics a hard drive with 'sectors'
and 'tracks'.
It *dynamically* (for wear levelling) maps between a 'virtual hard
drive' and its underlying weirdness of flash RAM blocks and pages.
Kernels don’t generally pay much attention to the geometry of
traditional hard drives either. In principle they could, and Linux has
internal APIs to retrieve device geometry, but in practice they don’t
(see if you can find a filesystem that uses hd_geometry). Even if they
did the geometry would at best be an approximation due to sector
remapping. And that’s before we get onto oddities like SMR.
The reality is that storage devices are in a better position to manage
this than OS kernels are, and the entire computer industry worked this
out long ago.
There is nothing the operating system can do to optimise this except
not do multiple writes to a 'sector' if possible.
If you want to optimize OS and/or application behavior for SSDs then
https://pages.cs.wisc.edu/~jhe/eurosys17-he.pdf looks like a good
starting point. Based on s3.2 and perhaps s3.4 I think re-using a single
logical sector will be fine and possibly a net win, at least on a proper
SSD where the logical/physical mapping is fully dynamic.
It might be different on the cheapest USB stick you can find, but your
expectations should be low in that case anyway.
-- https://www.greenend.org.uk/rjk/