qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] dc7cbc: monitor: rename out_lock to mon_lock


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] dc7cbc: monitor: rename out_lock to mon_lock
Date: Tue, 19 Jun 2018 08:04:22 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: dc7cbcd8fae9b94b453f3a04298d52a69c228b4d
      
https://github.com/qemu/qemu/commit/dc7cbcd8fae9b94b453f3a04298d52a69c228b4d
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: rename out_lock to mon_lock

The out_lock is protecting a few Monitor fields.  In the future the
monitor code will start to run in multiple threads.  We are going to
turn it into a bigger lock to protect not only the out buffer but also
most of the rest.

Since at it, rearrange the Monitor struct a bit.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 9409fc05fe2cec3c54bb04b133ea9e3df35073cd
      
https://github.com/qemu/qemu/commit/9409fc05fe2cec3c54bb04b133ea9e3df35073cd
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: protect mon->fds with mon_lock

mon->fds were protected by BQL.  Now protect it by mon_lock so that it
can even be used in monitor iothread.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: d9f252809ebb8761549f2ac5e67ece1928f42bb6
      
https://github.com/qemu/qemu/commit/d9f252809ebb8761549f2ac5e67ece1928f42bb6
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: more comments on lock-free elements

Add some explicit comments for both Readline and cpu_set/cpu_get helpers
that they do not need the mon_lock protection.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 095cb1bffc8e785471cf1acf98ae495cbf4599a6
      
https://github.com/qemu/qemu/commit/095cb1bffc8e785471cf1acf98ae495cbf4599a6
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: fix comment for monitor_lock

Fix typo in d622cb5879c.  Meanwhile move these variables close to each
other.  monitor_qapi_event_state can be declared static, add that.

Reported-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 6e8c5f4db7cb74f6f00942a285b4ed6a130c244b
      
https://github.com/qemu/qemu/commit/6e8c5f4db7cb74f6f00942a285b4ed6a130c244b
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: remove event_clock_type

Instead, use a dynamic function to detect which clock we'll use.  The
problem is that the old code will let monitor initialization depend on
configure_accelerator() (that's where qtest_enabled() start to take
effect).  After this change, we don't have such a dependency any more.
We just need to make sure configure_accelerator() is called when we
start to use it.  Now it's only used in monitor_qapi_event_queue() and
monitor_qapi_event_handler(), so we're good.

Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[monitor_get_event_clock() name and comment tweaked]
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: d32749deb61513c5456901f20e19887e1bc3d7f3
      
https://github.com/qemu/qemu/commit/d32749deb61513c5456901f20e19887e1bc3d7f3
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  monitor: move init global earlier

Before this patch, monitor fd helpers might be called even earlier than
monitor_init_globals().  This can be problematic.

After previous work, now monitor_init_globals() does not depend on
accelerator initialization any more.  Call it earlier (before CLI
parsing; that's where the monitor APIs might be called) to make sure it
is called before any of the monitor APIs.

Suggested-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 474514668b47c9d2148b526e379ffbb6764d9a9e
      
https://github.com/qemu/qemu/commit/474514668b47c9d2148b526e379ffbb6764d9a9e
  Author: Peter Xu <address@hidden>
  Date:   2018-06-18 (Mon, 18 Jun 2018)

  Changed paths:
    M monitor.c
    M stubs/fdset.c
    M util/osdep.c

  Log Message:
  -----------
  monitor: add lock to protect mon_fdsets

Introduce a new global big lock for mon_fdsets.  Take it where needed.

The monitor_fdset_get_fd() handling is a bit tricky: now we need to call
qemu_mutex_unlock() which might pollute errno, so we need to make sure
the correct errno be passed up to the callers.  To make things simpler,
we let monitor_fdset_get_fd() return the -errno directly when error
happens, then in qemu_open() we move it back into errno.

Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: a01fba4687b9a2464ed9b0eee60bb42b8f81f61b
      
https://github.com/qemu/qemu/commit/a01fba4687b9a2464ed9b0eee60bb42b8f81f61b
  Author: Peter Maydell <address@hidden>
  Date:   2018-06-19 (Tue, 19 Jun 2018)

  Changed paths:
    M monitor.c
    M stubs/fdset.c
    M util/osdep.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2018-06-18' 
into staging

Monitor patches for 2018-06-18

# gpg: Signature made Mon 18 Jun 2018 14:50:29 BST
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-monitor-2018-06-18:
  monitor: add lock to protect mon_fdsets
  monitor: move init global earlier
  monitor: remove event_clock_type
  monitor: fix comment for monitor_lock
  monitor: more comments on lock-free elements
  monitor: protect mon->fds with mon_lock
  monitor: rename out_lock to mon_lock

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


Compare: https://github.com/qemu/qemu/compare/e8729c154b3f...a01fba4687b9
      **NOTE:** This service been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

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