4 ms·
Neither this page nor the one about the AS extensions seem to describe what happens when storing data to disk. AFAIR, IBM used drives with 520 byte sectors. 51
by the-rc 4y ago
Neither this page nor the one about the AS extensions seem to describe what happens when storing data to disk.
AFAIR, IBM used drives with 520 byte sectors. 512 bytes were the actual data. The remaining 64 bits were used to set tags in memory accordingly (you can fit 32 16-byte pointers in the sector, so each pointer had two tag bits and both had to be on for the pointer to be deemed valid). I thought that there was a special instruction to set all of a 512 byte memory region's tags at once. I don't see it mentioned. Maybe it's only a virtual instruction and it's implemented by just a bunch of SETTAG/STQ, which would destroy performance or negate most of the benefits of DMA I/O (you could skip this step if you know the block has no pointers...). You need to extract the tags from memory, pack them and save them separately when writing to persistent storage, of course.
- hlandau 4y agoAuthor here; yes, the sole focus here is on the ISA-relevant parts. Obviously disk formats are out of scope. It's correct that IBM originally used custom IBM disk drives with 520-byte sectors. I believe 528 byte sectors were also seen where both tags and parity (for some RAID-like technology, I don't recall the details) were desired. On devices with a 4096 byte sector size, this leads to equivalent sector sizes of 4160 or 4224 bytes respectively. Nowadays you can also run IBM i on virtualised disks provided by IBM's Virtual I/O System (VIOS) under PowerVM. VIOS is AIUI basically a customised AIX install which runs as a VM under PowerVM and provides I/O functionality similar to that provided by a Xen dom0. In this case things are virtualised on top of normal hard drives with 512 byte sectors, so it's possible for these weird sector sizes to be emulated nowadays. I believe you can still pass a hard drive directly to an IBM i VM, though, and that IBM still offers hard drives with these special sector sizes for this purpose. Of course IBM doesn't make drives nowadays, so these are obviously an IBM rebrand of some other manufacturer's hard drives. What's really interesting though is that if you read the manuals for modern hard drives (yes, hard drives have manuals, who knew?), many of them advertise a selectable sector size, where you can reformat the drive to a new sector size. For example, see this manual, which says you can select a sector size of 512, 520, or 528 bytes (or 4096, 4160 or 4224 bytes): https://www.seagate.com/www-content/product-content/enterprise-hdd-fam/exos-7e10/_shared/docs/100870879e.pdf#page=10 https://www.seagate.com/www-content/product-content/enterpri... So theoretically most modern hard drives can be reformatted to support IBM i. I believe this functionality is also maintained to support modern hardware RAID systems, though.