)]}'
{
  "commit": "9d70239e56fadaa3571b8a7998a323ced52e8e76",
  "tree": "d77a459dc524487c8f2f62cc87406970c130bee6",
  "parents": [
    "b43b61d5bee522dadf44b472af71aab7235c13d5"
  ],
  "author": {
    "name": "Fabiano Rosas",
    "email": "farosas@suse.de",
    "time": "Mon Jun 17 15:57:27 2024 -0300"
  },
  "committer": {
    "name": "Fabiano Rosas",
    "email": "farosas@suse.de",
    "time": "Fri Jun 21 09:47:22 2024 -0300"
  },
  "message": "migration/multifd: Add direct-io support\n\nWhen multifd is used along with mapped-ram, we can take benefit of a\nfilesystem that supports the O_DIRECT flag and perform direct I/O in\nthe multifd threads. This brings a significant performance improvement\nbecause direct-io writes bypass the page cache which would otherwise\nbe thrashed by the multifd data which is unlikely to be needed again\nin a short period of time.\n\nTo be able to use a multifd channel opened with O_DIRECT, we must\nensure that a certain aligment is used. Filesystems usually require a\nblock-size alignment for direct I/O. The way to achieve this is by\nenabling the mapped-ram feature, which already aligns its I/O properly\n(see MAPPED_RAM_FILE_OFFSET_ALIGNMENT at ram.c).\n\nBy setting O_DIRECT on the multifd channels, all writes to the same\nfile descriptor need to be aligned as well, even the ones that come\nfrom outside multifd, such as the QEMUFile I/O from the main migration\ncode. This makes it impossible to use the same file descriptor for the\nQEMUFile and for the multifd channels. The various flags and metadata\nwritten by the main migration code will always be unaligned by virtue\nof their small size. To workaround this issue, we\u0027ll require a second\nfile descriptor to be used exclusively for direct I/O.\n\nThe second file descriptor can be obtained by QEMU by re-opening the\nmigration file (already possible), or by being provided by the user or\nmanagement application (support to be added in future patches).\n\nReviewed-by: Peter Xu \u003cpeterx@redhat.com\u003e\nSigned-off-by: Fabiano Rosas \u003cfarosas@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a903710f0620b2972cb4f2139e0d8356c9d093e3",
      "old_mode": 33188,
      "old_path": "migration/file.c",
      "new_id": "db870f2cf0b70767a876f87a5783c27f016930df",
      "new_mode": 33188,
      "new_path": "migration/file.c"
    },
    {
      "type": "modify",
      "old_id": "7699c04677e7c8ba8ce85121503981f8ee63ba62",
      "old_mode": 33188,
      "old_path": "migration/file.h",
      "new_id": "9f71e87f74337282d8fdda99c1d0d92ec4792023",
      "new_mode": 33188,
      "new_path": "migration/file.h"
    },
    {
      "type": "modify",
      "old_id": "e1b269624c01630f8572831b5fa44fc4405ba91b",
      "old_mode": 33188,
      "old_path": "migration/migration.c",
      "new_id": "e03c80b3aaa5bbaf81d7be7e485752c2fd2c5878",
      "new_mode": 33188,
      "new_path": "migration/migration.c"
    }
  ]
}
