qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 67a741: queue: add QSIMPLEQ_PREPEND()


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 67a741: queue: add QSIMPLEQ_PREPEND()
Date: Tue, 27 Mar 2018 11:20:26 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 67a74148d8828f611fc5a7a23277b8eceb4c9430
      
https://github.com/qemu/qemu/commit/67a74148d8828f611fc5a7a23277b8eceb4c9430
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M include/qemu/queue.h

  Log Message:
  -----------
  queue: add QSIMPLEQ_PREPEND()

QSIMPLEQ_CONCAT(a, b) joins a = a + b.  The new QSIMPLEQ_PREPEND(a, b)
API joins a = b + a.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: c40a2545700e9ad2ef67d5972484bbee4c83b2a6
      
https://github.com/qemu/qemu/commit/c40a2545700e9ad2ef67d5972484bbee4c83b2a6
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M block/io.c
    M include/qemu/coroutine_int.h
    M util/qemu-coroutine-lock.c
    M util/qemu-coroutine.c

  Log Message:
  -----------
  coroutine: avoid co_queue_wakeup recursion

qemu_aio_coroutine_enter() is (indirectly) called recursively when
processing co_queue_wakeup.  This can lead to stack exhaustion.

This patch rewrites co_queue_wakeup in an iterative fashion (instead of
recursive) with bounded memory usage to prevent stack exhaustion.

qemu_co_queue_run_restart() is inlined into qemu_aio_coroutine_enter()
and the qemu_coroutine_enter() call is turned into a loop to avoid
recursion.

There is one change that is worth mentioning:  Previously, when
coroutine A queued coroutine B, qemu_co_queue_run_restart() entered
coroutine B from coroutine A.  If A was terminating then it would still
stay alive until B yielded.  After this patch B is entered by A's parent
so that a A can be deleted immediately if it is terminating.

It is safe to make this change since B could never interact with A if it
was terminating anyway.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 35111583aa03c1a918a3f68858ef86eb161c7c06
      
https://github.com/qemu/qemu/commit/35111583aa03c1a918a3f68858ef86eb161c7c06
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M tests/test-aio.c

  Log Message:
  -----------
  coroutine: add test-aio coroutine queue chaining test case

Check that two coroutines can queue each other repeatedly without
hitting stack exhaustion.

Switch to qemu_init_main_loop() in main() because coroutines use
qemu_get_aio_context() - they don't know about test-aio's ctx variable.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: f5a53faad4bfbf1b86012a13055d2a1a774a42b6
      
https://github.com/qemu/qemu/commit/f5a53faad4bfbf1b86012a13055d2a1a774a42b6
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: add include/block/aio-wait.h

The include/block/aio-wait.h header file was added by commit
7719f3c968c59e1bcda7e177679dc765b59e578f ("block: extract
AIO_WAIT_WHILE() from BlockDriverState") without updating MAINTAINERS.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 6cf38cbf2961c57bd85022cf9adf7ef85dae0f02
      
https://github.com/qemu/qemu/commit/6cf38cbf2961c57bd85022cf9adf7ef85dae0f02
  Author: Peter Maydell <address@hidden>
  Date:   2018-03-27 (Tue, 27 Mar 2018)

  Changed paths:
    M MAINTAINERS
    M block/io.c
    M include/qemu/coroutine_int.h
    M include/qemu/queue.h
    M tests/test-aio.c
    M util/qemu-coroutine-lock.c
    M util/qemu-coroutine.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into 
staging

# gpg: Signature made Tue 27 Mar 2018 15:41:11 BST
# gpg:                using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  MAINTAINERS: add include/block/aio-wait.h
  coroutine: add test-aio coroutine queue chaining test case
  coroutine: avoid co_queue_wakeup recursion
  queue: add QSIMPLEQ_PREPEND()

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/dfe732fb68ef...6cf38cbf2961

reply via email to

[Prev in Thread] Current Thread [Next in Thread]