{
  "slug": "posix-fadv-random",
  "term": "POSIX_FADV_RANDOM",
  "aliases": [
    "FADV_RANDOM"
  ],
  "definition": "POSIX_FADV_RANDOM is a file-access hint indicating that an application expects to access the specified data in random order.",
  "note": "Linux applies this policy through the advised handle across the file, not only within the supplied byte range. Advice is nonbinding; a successful call does not report fetched bytes. [fadvise-api]\n\nIn Linux v6.14 generic_fadvise, RANDOM sets FMODE_RANDOM without changing the saved readahead budget or FMODE_NOREUSE. WILLNEED remains a separate explicit prefetch path. Filesystem-specific handlers and DAX/noop cases can differ. [fadvise-614]\n\nThe implementation stores policy on struct file. Duplicated descriptors share this open file description; independently opening the same file creates separate policy state, not a separate file cache. [fadvise-614] [open-description]",
  "advantages": [
    "Expresses a random-access expectation without requiring direct I/O."
  ],
  "limitations": [
    "Does not evict cached data, establish durability or forbid explicit prefetch."
  ],
  "related": [
    "posix-fadv-sequential",
    "posix-fadv-noreuse",
    "posix-fadv-willneed",
    "readahead",
    "open-file-description",
    "page-cache"
  ],
  "citations": [
    {
      "id": "fadvise-api",
      "title": "Linux man-pages: posix_fadvise(2), advice and Linux whole-file scope.",
      "url": "https://man7.org/linux/man-pages/man2/posix_fadvise.2.html",
      "accessed": "2026-10-23"
    },
    {
      "id": "fadvise-614",
      "title": "Linux v6.14 mm/fadvise.c: generic_fadvise policy transitions and overrides.",
      "url": "https://github.com/torvalds/linux/blob/v6.14/mm/fadvise.c",
      "accessed": "2026-10-23"
    },
    {
      "id": "open-description",
      "title": "Linux man-pages: open(2), open file descriptions and duplicated descriptors.",
      "url": "https://man7.org/linux/man-pages/man2/open.2.html",
      "accessed": "2026-10-23"
    }
  ],
  "status": "shipping",
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-23",
  "provenance": [
    "Source review of Linux v6.14 generic advice behavior; not a native experiment or benchmark."
  ]
}
