)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3fed95dacdab4e3acbd8d7a61700e0254a52c0ce","unresolved":false,"context_lines":[{"line_number":7,"context_line":"libvirt: Use \u0027writeback\u0027 QEMU cache mode for Nova instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When configuring QEMU cache modes for Nova instances, we use a"},{"line_number":10,"context_line":"combination of \u0027none\u0027 and \u0027writethrough\u0027.  But that\u0027s not correct,"},{"line_number":11,"context_line":"because of our misunderstanding of how cache modes work.  E.g. the"},{"line_number":12,"context_line":"function disk_cachemode() in the libvirt driver assumes that"},{"line_number":13,"context_line":"\u0027writethrough\u0027 and \u0027none\u0027 cache modes have the same behaviour with"},{"line_number":14,"context_line":"respect to host crash safety, which is not at all true."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5fc1f717_8739b0a4","line":11,"range":{"start_line":10,"start_character":43,"end_line":11,"end_character":56},"updated":"2019-03-18 13:55:09.000000000","message":"Hmm, danpb himself added this code in change I60cbff1c3ad8299fe2aa37099390f9235f6724d0. So was he wrong at the time or has QEMU behavior changed since then? Granted it was 2012.","commit_id":"77549112cc602b5f6b283f19b433118e474591f5"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"c4612a0f1d0e0a46b63cf188acd8cf94da931d14","unresolved":false,"context_lines":[{"line_number":7,"context_line":"libvirt: Use \u0027writeback\u0027 QEMU cache mode for Nova instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When configuring QEMU cache modes for Nova instances, we use a"},{"line_number":10,"context_line":"combination of \u0027none\u0027 and \u0027writethrough\u0027.  But that\u0027s not correct,"},{"line_number":11,"context_line":"because of our misunderstanding of how cache modes work.  E.g. the"},{"line_number":12,"context_line":"function disk_cachemode() in the libvirt driver assumes that"},{"line_number":13,"context_line":"\u0027writethrough\u0027 and \u0027none\u0027 cache modes have the same behaviour with"},{"line_number":14,"context_line":"respect to host crash safety, which is not at all true."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5fc1f717_27af9c2a","line":11,"range":{"start_line":10,"start_character":43,"end_line":11,"end_character":56},"in_reply_to":"5fc1f717_8739b0a4","updated":"2019-03-18 14:24:14.000000000","message":"Yes, I saw that commit.  The other day I ran this through with DanPB briefly on IRC, and he himself admitted that currently Nova uses \"`writethrough` in both cases by mistake\".\n\n(Where \"both cases\" are: (a) cache mode for target image during image conversion; and (b) cache mode for Nova guests.)","commit_id":"77549112cc602b5f6b283f19b433118e474591f5"}],"nova/conf/libvirt.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"bb12a11b32d8693842913462933dce83e8a50213","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"* default: ``writeback`` (the same as QEMU\u0027s built-in default)."},{"line_number":658,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":659,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":660,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_b675fc33","line":657,"range":{"start_line":657,"start_character":25,"end_line":657,"end_character":62},"updated":"2019-03-18 16:15:13.000000000","message":"This is only true because we explicitly make it so. We *always* specify disk cachemode explicitly, so this comment isn\u0027t really relevant.","commit_id":"afe767e332c0e07ef4a8ba4feca0cefe66c04f81"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"0b204786dc9382ae2965889e468308102dbab570","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"* default: ``writeback`` (the same as QEMU\u0027s built-in default)."},{"line_number":658,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":659,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":660,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_e1417ca7","line":657,"range":{"start_line":657,"start_character":25,"end_line":657,"end_character":62},"in_reply_to":"5fc1f717_b675fc33","updated":"2019-03-18 16:29:57.000000000","message":"Right, I\u0027ll remove it.","commit_id":"afe767e332c0e07ef4a8ba4feca0cefe66c04f81"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"bb12a11b32d8693842913462933dce83e8a50213","unresolved":false,"context_lines":[{"line_number":667,"context_line":"  writethrough mode. Shareable disk devices, like for a multi-attachable block"},{"line_number":668,"context_line":"  storage volume, will have their cache mode set to \u0027none\u0027 regardless of"},{"line_number":669,"context_line":"  configuration."},{"line_number":670,"context_line":"* writethrough: writethrough mode is the default caching mode. With"},{"line_number":671,"context_line":"  caching set to writethrough mode, the host page cache is enabled, but the"},{"line_number":672,"context_line":"  disk write cache is disabled for the guest. Consequently, this caching mode"},{"line_number":673,"context_line":"  ensures data integrity even if the applications and storage stack in the"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_d6d3e8ff","line":670,"range":{"start_line":670,"start_character":16,"end_line":670,"end_character":61},"updated":"2019-03-18 16:15:13.000000000","message":"Ahem ;)","commit_id":"afe767e332c0e07ef4a8ba4feca0cefe66c04f81"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"0b204786dc9382ae2965889e468308102dbab570","unresolved":false,"context_lines":[{"line_number":667,"context_line":"  writethrough mode. Shareable disk devices, like for a multi-attachable block"},{"line_number":668,"context_line":"  storage volume, will have their cache mode set to \u0027none\u0027 regardless of"},{"line_number":669,"context_line":"  configuration."},{"line_number":670,"context_line":"* writethrough: writethrough mode is the default caching mode. With"},{"line_number":671,"context_line":"  caching set to writethrough mode, the host page cache is enabled, but the"},{"line_number":672,"context_line":"  disk write cache is disabled for the guest. Consequently, this caching mode"},{"line_number":673,"context_line":"  ensures data integrity even if the applications and storage stack in the"}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_21254409","line":670,"range":{"start_line":670,"start_character":16,"end_line":670,"end_character":61},"in_reply_to":"5fc1f717_d6d3e8ff","updated":"2019-03-18 16:29:57.000000000","message":"Whack-a-mole...will whack it; thanks!","commit_id":"afe767e332c0e07ef4a8ba4feca0cefe66c04f81"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"34d4087758b2d9d004615db90b7c6ac26df28544","unresolved":false,"context_lines":[{"line_number":643,"context_line":""},{"line_number":644,"context_line":"For example: file\u003ddirectsync,block\u003dnone,network\u003dwriteback"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"For local or direct-attached storage, it is recommended that you use"},{"line_number":647,"context_line":"writethrough (default) mode, as it ensures data integrity and has acceptable"},{"line_number":648,"context_line":"I/O performance for applications running in the guest, especially for read"},{"line_number":649,"context_line":"operations. However, caching mode none is recommended for remote NFS storage,"},{"line_number":650,"context_line":"because direct I/O operations (O_DIRECT) perform better than synchronous I/O"},{"line_number":651,"context_line":"operations (with O_SYNC). Caching mode none effectively turns all guest I/O"},{"line_number":652,"context_line":"operations into direct I/O operations on the host, which is the NFS client in"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_a0ad8032","line":649,"range":{"start_line":646,"start_character":0,"end_line":649,"end_character":11},"updated":"2019-03-20 11:52:32.000000000","message":"You started... do you want to finish?","commit_id":"2734b249605eb28fd1017bd8bd35fc262e03c97d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5ee4155748b06c0ff945aeea6ed433cdfd903b75","unresolved":false,"context_lines":[{"line_number":643,"context_line":""},{"line_number":644,"context_line":"For example: file\u003ddirectsync,block\u003dnone,network\u003dwriteback"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"For local or direct-attached storage, it is recommended that you use"},{"line_number":647,"context_line":"writethrough (default) mode, as it ensures data integrity and has acceptable"},{"line_number":648,"context_line":"I/O performance for applications running in the guest, especially for read"},{"line_number":649,"context_line":"operations. However, caching mode none is recommended for remote NFS storage,"},{"line_number":650,"context_line":"because direct I/O operations (O_DIRECT) perform better than synchronous I/O"},{"line_number":651,"context_line":"operations (with O_SYNC). Caching mode none effectively turns all guest I/O"},{"line_number":652,"context_line":"operations into direct I/O operations on the host, which is the NFS client in"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_665010d6","line":649,"range":{"start_line":646,"start_character":0,"end_line":649,"end_character":11},"in_reply_to":"5fc1f717_a0ad8032","updated":"2019-03-20 12:45:40.000000000","message":"You\u0027re right; this whole thing needs to be fixed.  I\u0027ll get that going.","commit_id":"2734b249605eb28fd1017bd8bd35fc262e03c97d"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"34d4087758b2d9d004615db90b7c6ac26df28544","unresolved":false,"context_lines":[{"line_number":643,"context_line":""},{"line_number":644,"context_line":"For example: file\u003ddirectsync,block\u003dnone,network\u003dwriteback"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"For local or direct-attached storage, it is recommended that you use"},{"line_number":647,"context_line":"writethrough (default) mode, as it ensures data integrity and has acceptable"},{"line_number":648,"context_line":"I/O performance for applications running in the guest, especially for read"},{"line_number":649,"context_line":"operations. However, caching mode none is recommended for remote NFS storage,"},{"line_number":650,"context_line":"because direct I/O operations (O_DIRECT) perform better than synchronous I/O"},{"line_number":651,"context_line":"operations (with O_SYNC). Caching mode none effectively turns all guest I/O"},{"line_number":652,"context_line":"operations into direct I/O operations on the host, which is the NFS client in"},{"line_number":653,"context_line":"this environment."},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_c039acf2","line":653,"range":{"start_line":646,"start_character":0,"end_line":653,"end_character":17},"updated":"2019-03-20 11:52:32.000000000","message":"I\u0027d delete this whole paragraph, tbh. From the commit which added it, it looks like Matt lifted it from an IBM article which has since been deleted, probably because it was wrong (not that we realised that until recently). Discussion of O_SYNC just seems confusing.\n\nIf anything, I\u0027d replace it with: \"we do not recommend changing the default\" ;)","commit_id":"2734b249605eb28fd1017bd8bd35fc262e03c97d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5ee4155748b06c0ff945aeea6ed433cdfd903b75","unresolved":false,"context_lines":[{"line_number":643,"context_line":""},{"line_number":644,"context_line":"For example: file\u003ddirectsync,block\u003dnone,network\u003dwriteback"},{"line_number":645,"context_line":""},{"line_number":646,"context_line":"For local or direct-attached storage, it is recommended that you use"},{"line_number":647,"context_line":"writethrough (default) mode, as it ensures data integrity and has acceptable"},{"line_number":648,"context_line":"I/O performance for applications running in the guest, especially for read"},{"line_number":649,"context_line":"operations. However, caching mode none is recommended for remote NFS storage,"},{"line_number":650,"context_line":"because direct I/O operations (O_DIRECT) perform better than synchronous I/O"},{"line_number":651,"context_line":"operations (with O_SYNC). Caching mode none effectively turns all guest I/O"},{"line_number":652,"context_line":"operations into direct I/O operations on the host, which is the NFS client in"},{"line_number":653,"context_line":"this environment."},{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_e612c009","line":653,"range":{"start_line":646,"start_character":0,"end_line":653,"end_character":17},"in_reply_to":"5fc1f717_c039acf2","updated":"2019-03-20 12:45:40.000000000","message":"Yes, that fated IBM article (now not even available on \"WayBack Machine\"!) seems to be full of holes, and apparently I even \"debunked\" the myths in that (while it was still online) in 2014 on \u0027libvirt-users\u0027 list.  See the evidence:\n\nhttps://www.redhat.com/archives/libvirt-users/2014-August/msg00060.html (\"Behavior of disk caching with qcow2 disks\")\n\nWill fix.","commit_id":"2734b249605eb28fd1017bd8bd35fc262e03c97d"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"34d4087758b2d9d004615db90b7c6ac26df28544","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"* default: ``writeback``."},{"line_number":658,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":659,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":660,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_2b32d1a8","line":657,"range":{"start_line":657,"start_character":11,"end_line":657,"end_character":24},"updated":"2019-03-20 11:52:32.000000000","message":"I just did some more digging, and this still isn\u0027t correct, although the answer unfortunately isn\u0027t succinct.\n\nFor nova-managed disks, i.e. local root, ephemeral, and swap disks, the default is \u0027none\u0027 if instances_path supports O_DIRECT, or (with this change), \u0027writeback\u0027.[1]\n\nFor volumes the default is driver-dependent. It is \u0027none\u0027 for everything except smbfs and vzstorage which both use \u0027writethrough\u0027, but IIRC you have patches up to fix those.\n\n[1] Incidentally, this is obviously wrong for the imagebackends which don\u0027t use instances_path: lvm and rbd.","commit_id":"2734b249605eb28fd1017bd8bd35fc262e03c97d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"5ee4155748b06c0ff945aeea6ed433cdfd903b75","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"* default: ``writeback``."},{"line_number":658,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":659,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":660,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":11,"id":"5fc1f717_062d8c45","line":657,"range":{"start_line":657,"start_character":11,"end_line":657,"end_character":24},"in_reply_to":"5fc1f717_2b32d1a8","updated":"2019-03-20 12:45:40.000000000","message":"You\u0027re \"through and through\" (true and true? ;-))  with your comment.  I\u0027ll work out a way to make it succinct.\n\nOkay, since we\u0027ve dug this far, fixing this whole documentation mess as part of this change makes sense.","commit_id":"2734b249605eb28fd1017bd8bd35fc262e03c97d"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"6b0970761094a4b6f96c56344fa7e72b25bcc7ad","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"Possible cache modes:"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"* default: \"It Depends\" -- For Nova-managed disks, ``none``, if the host"},{"line_number":658,"context_line":"  is capable of it (by having Linux\u0027s \"O_DIRECT\" support on the given"},{"line_number":659,"context_line":"  host file system); otherwise ``writeback``.  For volume drivers, the"},{"line_number":660,"context_line":"  default is driver-dependent: ``none`` for everything except for SMBFS"},{"line_number":661,"context_line":"  and Virtuzzo (which use ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_ffec7e2a","line":659,"range":{"start_line":657,"start_character":61,"end_line":659,"end_character":19},"updated":"2019-03-20 16:53:43.000000000","message":"This mouthful can be replaced with: \"if the host file system is capable of Linux\u0027s O_DIRECT\"","commit_id":"ef2a2f1c98b38ca2b5411a4d5f4197934bc4c270"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"6b0970761094a4b6f96c56344fa7e72b25bcc7ad","unresolved":false,"context_lines":[{"line_number":657,"context_line":"* default: \"It Depends\" -- For Nova-managed disks, ``none``, if the host"},{"line_number":658,"context_line":"  is capable of it (by having Linux\u0027s \"O_DIRECT\" support on the given"},{"line_number":659,"context_line":"  host file system); otherwise ``writeback``.  For volume drivers, the"},{"line_number":660,"context_line":"  default is driver-dependent: ``none`` for everything except for SMBFS"},{"line_number":661,"context_line":"  and Virtuzzo (which use ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"}],"source_content_type":"text/x-python","patch_set":12,"id":"5fc1f717_ff879e60","line":660,"range":{"start_line":660,"start_character":62,"end_line":660,"end_character":65},"updated":"2019-03-20 16:53:43.000000000","message":"s/for//","commit_id":"ef2a2f1c98b38ca2b5411a4d5f4197934bc4c270"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"65b907f3c57758cc7cccee1c1d87a274a44b885d","unresolved":false,"context_lines":[{"line_number":658,"context_line":"  file system is capable of Linux\u0027s \u0027O_DIRECT\u0027 semantics; otherwise"},{"line_number":659,"context_line":"  ``writeback``.  For volume drivers, the default is driver-dependent:"},{"line_number":660,"context_line":"  ``none`` for everything except for SMBFS and Virtuzzo (which use"},{"line_number":661,"context_line":"  ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":664,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_fc70fede","line":661,"updated":"2019-03-21 09:17:50.000000000","message":"I\u0027m not super happy with how it looks with the PS12 (and this one but Zuul isn\u0027t done yet) :\nhttp://logs.openstack.org/81/641981/12/check/openstack-tox-docs/858e4f4/html/configuration/config.html#libvirt.disk_cachemodes\n\nMaybe we could just add yet another level of bullets but it\u0027s maybe just a follow-up nit.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d023c10b0b09cfb7277ec97f61515145ac8d8da4","unresolved":false,"context_lines":[{"line_number":658,"context_line":"  file system is capable of Linux\u0027s \u0027O_DIRECT\u0027 semantics; otherwise"},{"line_number":659,"context_line":"  ``writeback``.  For volume drivers, the default is driver-dependent:"},{"line_number":660,"context_line":"  ``none`` for everything except for SMBFS and Virtuzzo (which use"},{"line_number":661,"context_line":"  ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":664,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_5747adbd","line":661,"in_reply_to":"5fc1f717_3709c1dc","updated":"2019-03-21 09:44:16.000000000","message":"Kashyap, I think Sylvain was specifically talking about the formatting. If you click on the rendered docs it is a bit hard to read. However, personally I\u0027d view this as a nit, especially as you\u0027ve got a follow-up docs patch in the works.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"291c51cb6d6386afbdd7227a561fbf16cd126bc1","unresolved":false,"context_lines":[{"line_number":658,"context_line":"  file system is capable of Linux\u0027s \u0027O_DIRECT\u0027 semantics; otherwise"},{"line_number":659,"context_line":"  ``writeback``.  For volume drivers, the default is driver-dependent:"},{"line_number":660,"context_line":"  ``none`` for everything except for SMBFS and Virtuzzo (which use"},{"line_number":661,"context_line":"  ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":664,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_778e69d1","line":661,"in_reply_to":"5fc1f717_5747adbd","updated":"2019-03-21 09:54:31.000000000","message":"Correct, it\u0027s a nit (like I said) for a formatting problem (like I showed for P212) that can be fixed in a follow-up patch (like I also said).\n\nPardon my French (c)","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"9ee7289c99e19b39202630b6706aac25a424569b","unresolved":false,"context_lines":[{"line_number":658,"context_line":"  file system is capable of Linux\u0027s \u0027O_DIRECT\u0027 semantics; otherwise"},{"line_number":659,"context_line":"  ``writeback``.  For volume drivers, the default is driver-dependent:"},{"line_number":660,"context_line":"  ``none`` for everything except for SMBFS and Virtuzzo (which use"},{"line_number":661,"context_line":"  ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":664,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_85c63a16","line":661,"in_reply_to":"5fc1f717_778e69d1","updated":"2019-03-21 11:57:32.000000000","message":"Ah, I missed the formatting reference (to make the structured information into bullets); sorry.  As already noted, all this documentation kludge will be cleaned up in a follow-up.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"efd82fdd266b324c549207698ff5c3989fe9db56","unresolved":false,"context_lines":[{"line_number":658,"context_line":"  file system is capable of Linux\u0027s \u0027O_DIRECT\u0027 semantics; otherwise"},{"line_number":659,"context_line":"  ``writeback``.  For volume drivers, the default is driver-dependent:"},{"line_number":660,"context_line":"  ``none`` for everything except for SMBFS and Virtuzzo (which use"},{"line_number":661,"context_line":"  ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":664,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_3709c1dc","line":661,"in_reply_to":"5fc1f717_fc70fede","updated":"2019-03-21 09:40:01.000000000","message":"Well, I updated it based on truth.  And it is reality.  What I wrote is clearer, and we should keep that, IMHO.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d03f6dba1c6c91a5df93d282dc86a48188b9c287","unresolved":false,"context_lines":[{"line_number":658,"context_line":"  file system is capable of Linux\u0027s \u0027O_DIRECT\u0027 semantics; otherwise"},{"line_number":659,"context_line":"  ``writeback``.  For volume drivers, the default is driver-dependent:"},{"line_number":660,"context_line":"  ``none`` for everything except for SMBFS and Virtuzzo (which use"},{"line_number":661,"context_line":"  ``writeback``)."},{"line_number":662,"context_line":"* none: With caching mode set to none, the host page cache is disabled, but"},{"line_number":663,"context_line":"  the disk write cache is enabled for the guest. In this mode, the write"},{"line_number":664,"context_line":"  performance in the guest is optimal because write operations bypass the host"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_b7793130","line":661,"in_reply_to":"5fc1f717_fc70fede","updated":"2019-03-21 09:37:45.000000000","message":"Yeah, that\u0027s a bit ugly. Kashyap, you want to move this into the follow-up docs patch?","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"65b907f3c57758cc7cccee1c1d87a274a44b885d","unresolved":false,"context_lines":[{"line_number":683,"context_line":"  cache and the disk write cache are enabled for the guest. Because of"},{"line_number":684,"context_line":"  this, the I/O performance for applications running in the guest is"},{"line_number":685,"context_line":"  good, but the data is not protected in a power failure. As a result,"},{"line_number":686,"context_line":"  this caching mode is recommended only for temporary data where"},{"line_number":687,"context_line":"  potential data loss is not a concern."},{"line_number":688,"context_line":"  NOTE: Certain backend disk mechanisms may provide safe"},{"line_number":689,"context_line":"  writeback cache semantics. Specifically those that bypass the host"},{"line_number":690,"context_line":"  page cache, such as QEMU\u0027s integrated RBD driver. Ceph documentation"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_bc5b5652","line":687,"range":{"start_line":686,"start_character":6,"end_line":687,"end_character":39},"updated":"2019-03-21 09:17:50.000000000","message":"well, you said in the commit msg it\u0027s no longer an issue thanks to the guest OSes, right?\nI mean, if we leave this comment and we say it\u0027s the default, maybe some operators would be afraid, nope ?","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"efd82fdd266b324c549207698ff5c3989fe9db56","unresolved":false,"context_lines":[{"line_number":683,"context_line":"  cache and the disk write cache are enabled for the guest. Because of"},{"line_number":684,"context_line":"  this, the I/O performance for applications running in the guest is"},{"line_number":685,"context_line":"  good, but the data is not protected in a power failure. As a result,"},{"line_number":686,"context_line":"  this caching mode is recommended only for temporary data where"},{"line_number":687,"context_line":"  potential data loss is not a concern."},{"line_number":688,"context_line":"  NOTE: Certain backend disk mechanisms may provide safe"},{"line_number":689,"context_line":"  writeback cache semantics. Specifically those that bypass the host"},{"line_number":690,"context_line":"  page cache, such as QEMU\u0027s integrated RBD driver. Ceph documentation"}],"source_content_type":"text/x-python","patch_set":13,"id":"5fc1f717_b7cb7170","line":687,"range":{"start_line":686,"start_character":6,"end_line":687,"end_character":39},"in_reply_to":"5fc1f717_bc5b5652","updated":"2019-03-21 09:40:01.000000000","message":"Yes, guest OSes that matter will issues flushes.  Again, this whole documentation gets fixed as an immediate follow-up.  Please see the last comment in the commit message.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"1646d2416d3d147529a8632260e45be481c07538","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        # directsync   | off             | on           | off"},{"line_number":421,"context_line":"        # unsafe       | on              | off          | on"},{"line_number":422,"context_line":"        #"},{"line_number":423,"context_line":"        # Where:"},{"line_number":424,"context_line":"        #"},{"line_number":425,"context_line":"        #  - \u0027cache.writeback\u003doff\u0027 means: QEMU adds an automatic fsync()"},{"line_number":426,"context_line":"        #    after each write request."},{"line_number":427,"context_line":"        #"},{"line_number":428,"context_line":"        #  - \u0027cache.direct\u003don\u0027 means: Use Linux\u0027s O_DIRECT, i.e. bypass"},{"line_number":429,"context_line":"        #    the kernel page cache.  Caches in any other layer (disk"},{"line_number":430,"context_line":"        #    cache, QEMU metadata caches, etc.) can still be present."},{"line_number":431,"context_line":"        #"},{"line_number":432,"context_line":"        #  - \u0027cache.no-flush\u003don\u0027 means: Ignore flush requests, i.e."},{"line_number":433,"context_line":"        #    never call fsync(), even if the guest explicitly requested"},{"line_number":434,"context_line":"        #    it."},{"line_number":435,"context_line":"        #"},{"line_number":436,"context_line":"        # Use cache mode \"none\" (cache.writeback\u003don, cache.direct\u003don,"},{"line_number":437,"context_line":"        # cache.no-flush\u003doff) for consistent performance and"},{"line_number":438,"context_line":"        # migration correctness.  Some filesystems don\u0027t support"},{"line_number":439,"context_line":"        # O_DIRECT, though.  For those we fallback to the next"},{"line_number":440,"context_line":"        # reasonable option that is \"writeback\" (cache.writeback\u003don,"},{"line_number":441,"context_line":"        # cache.direct\u003doff, cache.no-flush\u003doff)."},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        if self._disk_cachemode is None:"},{"line_number":444,"context_line":"            self._disk_cachemode \u003d \"none\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_24989fbe","line":441,"range":{"start_line":423,"start_character":0,"end_line":441,"end_character":48},"updated":"2019-03-08 11:21:18.000000000","message":"FWIW, I got the above text triple-checked the QEMU Block Layer maintainer, Kevin Wolf (many thanks for the review!)","commit_id":"3353ad66af5b7502f4d6700139bb1cbe46e6ebb9"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"bb12a11b32d8693842913462933dce83e8a50213","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        # reasonable option that is \"writeback\" (cache.writeback\u003don,"},{"line_number":441,"context_line":"        # cache.direct\u003doff, cache.no-flush\u003doff)."},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        if self._disk_cachemode is None:"},{"line_number":444,"context_line":"            self._disk_cachemode \u003d \"none\""},{"line_number":445,"context_line":"            if not nova.privsep.utils.supports_direct_io(CONF.instances_path):"},{"line_number":446,"context_line":"                self._disk_cachemode \u003d \"writeback\""}],"source_content_type":"text/x-python","patch_set":10,"id":"5fc1f717_16c97057","line":443,"updated":"2019-03-18 16:15:13.000000000","message":"Note that we always return a non-None disk_cachemode, so we never use the qemu default.","commit_id":"afe767e332c0e07ef4a8ba4feca0cefe66c04f81"}],"releasenotes/notes/writeback-cache-mode-for-guests-a7e4d2806c956164.yaml":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d03f6dba1c6c91a5df93d282dc86a48188b9c287","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    If the compute host does not support (due to the Linux kernel"},{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_f7125909","line":5,"range":{"start_line":4,"start_character":4,"end_line":5,"end_character":15},"updated":"2019-03-21 09:37:45.000000000","message":"\"If the filesystem hosting the instances directory\"...\n\nNobody has a linux kernel that doesn\u0027t support O_DIRECT any more.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"6f45efc46ba80b9857cc01f99123d94a5f37d236","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    If the compute host does not support (due to the Linux kernel"},{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_77d669f4","line":5,"range":{"start_line":4,"start_character":4,"end_line":5,"end_character":15},"in_reply_to":"5fc1f717_f7125909","updated":"2019-03-21 09:40:32.000000000","message":"Yep, will fix it.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"65b907f3c57758cc7cccee1c1d87a274a44b885d","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _Bug 1818847: https://bugs.launchpad.net/nova/+bug/1818847"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_d7071d18","line":8,"updated":"2019-03-21 09:17:50.000000000","message":"maybe we should also add that we don\u0027t recommend it for guest OSes that are not fsync\u0027ing, nope ?","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"9cbac8b01cb923f2b0c160e746c116a6eae04e44","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _Bug 1818847: https://bugs.launchpad.net/nova/+bug/1818847"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_e5537e38","line":8,"in_reply_to":"5fc1f717_177845f6","updated":"2019-03-21 12:05:52.000000000","message":"IMHO, as Matt noted on IRC, that just adds extra cognitive load to the reader with no practical benefit.  Because all the operating systems that matter issues flushes just fine.\n\nBut I\u0027ll see what I can add.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"efd82fdd266b324c549207698ff5c3989fe9db56","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _Bug 1818847: https://bugs.launchpad.net/nova/+bug/1818847"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_f75d79e9","line":8,"in_reply_to":"5fc1f717_d7071d18","updated":"2019-03-21 09:40:01.000000000","message":"I don\u0027t think it is required; it will just add to confusion.\n(Also see what Matt says below.)","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d03f6dba1c6c91a5df93d282dc86a48188b9c287","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _Bug 1818847: https://bugs.launchpad.net/nova/+bug/1818847"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_771749ef","line":8,"in_reply_to":"5fc1f717_d7071d18","updated":"2019-03-21 09:37:45.000000000","message":"In practise, I don\u0027t think they exist. I think this text is better simple.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2240bc927eb8049721b22777e1353ad3e6a20690","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    lacking it) the O_DIRECT-based ``none``, then fallback to"},{"line_number":6,"context_line":"    ``writeback`` as the default QEMU cache mode for Nova guests.  This"},{"line_number":7,"context_line":"    improves performance without compromising data integrity.  `Bug"},{"line_number":8,"context_line":"    1818847`_."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _Bug 1818847: https://bugs.launchpad.net/nova/+bug/1818847"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"5fc1f717_177845f6","line":8,"in_reply_to":"5fc1f717_f75d79e9","updated":"2019-03-21 09:52:36.000000000","message":"I don\u0027t see why it\u0027s controversial to say something like :\n\n* we now recommend writeback as all modern guest OSes now include flush mechanisms that ensure data integrity. Consider using a different option value (eg. writethrough) only if you don\u0027t want to make expectations on OSes behaviour.","commit_id":"18ff2ab25b282e757e807174afcd9c122cc06aeb"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"83544a0609d5e2d859bf44184071846a88c7c95c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"    this kind of safety.  The guest OS must explicitly flush the cache"},{"line_number":15,"context_line":"    in the right places to make sure data is safe on the disk; and all"},{"line_number":16,"context_line":"    modern OSes flush data as needed.  So if cache mode ``none`` is safe"},{"line_number":17,"context_line":"    enough for you, then ``writeback`` should be safe enough too."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    .. _Bug 1818847: https://bugs.launchpad.net/nova/+bug/1818847"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"5fc1f717_51500f5f","line":17,"updated":"2019-03-21 17:07:24.000000000","message":"I won\u0027t nit on the formalism :-)","commit_id":"b9dc86d8d646472195070022ff7ae4c372bef4ca"}]}
