-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Track server-side issues with 16KiB PAGE_SIZE aarch64 servers (CONFIG_ARM64_16K_PAGES), with ldiskfs 4KiB blocks (blocksize < PAGE_SIZE) or ZFS, and clients of any page size.
Apple Silicon (M-series) CPUs implement only the 4KiB and 16KiB translation granules, so a 64KiB-page kernel cannot boot under the macOS Hypervisor.framework (HVF). A 16KiB-page Rocky 10.2 (6.12.0-211.47.1.el10_2) kernel runs at full speed there (ltvm target rocky10-16k), which allows local testing of servers with PAGE_SIZE > blocksize, a configuration with little test coverage so far. The client side is tracked separately.
Individual fixes may get their own ticket, link to an existing one, or use this ticket for small fixes.
Issues found so far (code review, not yet verified by test):
- ofd/osd-ldiskfs: ofd_preprw_
{read,write}
() call dt_bufs_get() per niobuf. A 4KiB-page client can send two niobufs in the same 16KiB server page (e.g. [0, 4KiB) and [8KiB, 12KiB)), so osd_get_folio() locks a folio the same thread already holds (OST thread deadlock), or on the non-cached path writes two private folios for the same page index (lost data).
- osd-ldiskfs: osd_ldiskfs_map_inode_pages() maps all blocks of a page with CREATE, allocating initialized blocks past i_size for partial last pages (e2fsck then "fixes" i_size upward); osd_declare_write_commit() checks only one block per page with osd_is_mapped(), so blocks are allocated without declared credits or quota; dio_complete_routine() marks a page uptodate per bio, so a page split across bios is marked uptodate even if one bio fails; osd_drop_preallocated_space() tests "& PAGE_MASK" where "& ~PAGE_MASK" is meant and invalidates the whole last page.
- grant: tgd_blockbits is 12 while ldiskfs writes whole 16KiB pages, so sparse 4KiB writes can consume more space than granted.
- ptlrpc/target: PTLRPC_MAX_BRW_PAGES, DT_MAX_BRW_PAGES, OST_IO_MAXREQSIZE and OST_MAX_SHORT_IO_BYTES scale with the server PAGE_SIZE, so a 4KiB client with a large brw_size or short_io_bytes can exceed the 16KiB server's limits (-EPROTO from the ioo_bufcnt check, dropped requests, -EOVERFLOW from osd_map_remote_to_local()).
- ldlm: ldlm_extent_internal_policy_fixup() rounds the extent to the server PAGE_SIZE, which can move the start past a 4KiB-aligned request start and trip the LASSERTF.
- obdclass: dt_index_walk() keeps calling the filler for every lu_page of a folio after bytes reaches 0, so readdir/idx_read fail when rp_count is not a multiple of PAGE_SIZE.
- osp/quota/nodemap: idx_read consumers walk every lu_page of the last folio and rely on the sender's dt_index_page_adjust(), which is compiled out on a 4KiB-page sender (mixed page-size servers; LU-15992 class).
- osd-zfs: osd_write_commit() LASSERT(abufsz & PAGE_MASK) and lnb_page_offset handling assume ZFS blocks >= PAGE_SIZE; DoM read-on-open (mdt_dom_read_on_open()) memset()s past sub-page ARC buffers.
- ldiskfs: ext4-mballoc-extra-checks.patch fails a whole buddy-cache folio, which holds two groups with 16KiB pages, on one bad group.