/qemu/docs/devel/ |
H A D | rcu.rst | 1 Using RCU (Read-Copy-Update) for synchronization 4 Read-copy update (RCU) is a synchronization mechanism that is used to 5 protect read-mostly data structures. RCU is very efficient and scalable 9 RCU supports concurrency between a single writer and multiple readers, 17 RCU is fundamentally a "wait-to-finish" mechanism. The read side marks 25 the updater. This is the reason why RCU is more scalable than, 27 the system will have a single instance of the RCU mechanism; a single 44 enter RCU crit.sec. 47 | | enter RCU crit.sec. 48 exit RCU crit.sec | | [all …]
|
H A D | lockcnt.rst | 49 One may think of using the RCU primitives, ``rcu_read_lock()`` and 50 ``rcu_read_unlock()``; effectively, the RCU nesting count would take 52 reference counting and RCU have similar purposes, but their usage in 56 structure; RCU delays reclamation of *all* RCU-protected data 60 a reference for a long time; RCU critical sections in principle 65 the introduction of threads by many years. RCU is generally used to 69 - reclaiming data can be done by a separate thread in the case of RCU; 97 readers and writers use the same macros that are used for RCU, for 101 can happen concurrently with the read. The RCU API ensures that the 255 Again, the RCU primitives are used because new items can be added to the
|
H A D | index-internals.rst | 13 rcu
|
H A D | tcg-plugins.rst | 143 list of callbacks under RCU so that we do not have to hold the lock 156 RCU is great for this.
|
/qemu/include/exec/ |
H A D | ramlist.h | 6 #include "qemu/rcu.h" 17 * under RCU. The bitmap for a block can be accessed as follows: 34 * RCU. When adding new RAMBlocks requires the dirty memory to grow, a new 38 * anymore it is freed by RCU (but the underlying blocks stay because they are 43 struct rcu_head rcu; member 50 /* RCU-enabled, writes protected by the ramlist lock. */ 59 /* Should be holding either ram_list.mutex, or the RCU lock. */
|
/qemu/tests/unit/ |
H A D | rcutorture.c | 2 * rcutorture.c: simple user-level performance/stress test of RCU. 5 * ./rcu <nreaders> rperf [ <seconds> ] 8 * ./rcu <nupdaters> uperf [ <seconds> ] 11 * ./rcu <nreaders> perf [ <seconds> ] 20 * The first line lists the total number of RCU reads and updates executed 26 * ./rcu <nreaders> stress [ <seconds> ] 35 * The first line lists the number of RCU read and update operations 37 * (which will be zero in a correct RCU implementation). The second 39 * data. A correct RCU implementation will have all but the first two 64 #include "qemu/rcu.h" [all …]
|
H A D | test-rcu-list.c | 24 #include "qemu/rcu.h" 100 struct rcu_head rcu; member 105 struct list_element *el = container_of(prcu, struct list_element, rcu); in reclaim_list_el() 223 call_rcu1(&prev_el->rcu, reclaim_list_el); in rcu_q_updater() 300 call_rcu1(&prev_el->rcu, reclaim_list_el); in rcu_qtest() 362 g_test_add_func("/rcu/"TEST_NAME"/single-threaded", gtest_rcuq_one); in main() 363 g_test_add_func("/rcu/"TEST_NAME"/short-few", gtest_rcuq_few); in main() 364 g_test_add_func("/rcu/"TEST_NAME"/long-many", gtest_rcuq_many); in main()
|
H A D | meson.build | 33 'test-rcu-list': [], 34 'test-rcu-simpleq': [], 35 'test-rcu-tailq': [], 36 'test-rcu-slist': [],
|
H A D | test-logging.c | 32 #include "qemu/rcu.h" 130 * our handle remains valid due to RCU. in test_logfile_write() 160 * our handle remains valid for use due to RCU. in test_logfile_lock()
|
H A D | test-rcu-tailq.c | 2 #include "test-rcu-list.c"
|
H A D | test-rcu-slist.c | 2 #include "test-rcu-list.c"
|
H A D | test-rcu-simpleq.c | 2 #include "test-rcu-list.c"
|
/qemu/util/ |
H A D | rcu.c | 4 * Userspace RCU library with explicit memory barriers 30 #include "qemu/rcu.h" 124 * thread must exit its RCU read-side critical section before in wait_for_readers() 148 /* Write RCU-protected pointers before reading p_rcu_reader->ctr. in synchronize_rcu() 151 * Also orders write to RCU-protected pointers before in synchronize_rcu() 318 struct rcu_head rcu; member 329 * This function ensures that all pending RCU callbacks 332 * drops big qemu lock during the wait to allow RCU thread 351 * RCU callbacks are invoked in the same order as in which they in drain_call_rcu() 353 * is called, all RCU callbacks that were registered on this thread in drain_call_rcu() [all …]
|
H A D | qht.c | 14 * - Lookups are performed under an RCU read-critical section; removals 48 * ht->map pointer is set, and the old map is freed once no RCU readers can see 59 * - Why not RCU-based hash tables? They would allow us to get rid of the 60 * seqlock, but resizing would take forever since RCU read critical 71 #include "qemu/rcu.h" 172 * @rcu: used by RCU. Keep it as the top field in the struct to help valgrind 184 struct rcu_head rcu; member 949 call_rcu(old, qht_map_destroy, rcu); in qht_do_resize_reset()
|
H A D | qsp.c | 48 * - Wrap operations on qsp entries with RCU read-side critical sections, so 65 #include "qemu/rcu.h" 93 struct rcu_head rcu; member 319 * Note: Entries are never removed, so callers do not have to be in an RCU 609 * We must remain in an RCU read-side critical section until we're done in qsp_mktree() 811 call_rcu(old, qsp_snapshot_destroy, rcu); in qsp_reset()
|
/qemu/include/qemu/ |
H A D | rcu_queue.h | 7 * RCU-friendly versions of the queue.h primitives. 57 * prev pointers from subsequent nodes until after the RCU grace 75 * until after the RCU grace period expires. 87 * subsequent elements until after the RCU grace period has 113 /* List traversal must occur within an RCU critical section. */ 119 /* List traversal must occur within an RCU critical section. */ 127 * RCU simple queue 193 * RCU tail queue 263 * RCU singly-linked list
|
H A D | rcu.h | 7 * Userspace RCU header with explicit memory barrier. 69 * NotifierList used to force an RCU grace period. Accessed under 92 * RCU-protected pointers. in QEMU_DECLARE_CO_TLS() 192 * Force-RCU notifiers tell readers that they should exit their
|
H A D | qht.h | 97 * Needs to be called under an RCU read-critical section. 129 * valid until the end of the RCU grace period in which qht_remove() is called. 145 * must remain valid for the existing RCU grace period -- see qht_remove(). 159 * must remain valid for the existing RCU grace period -- see qht_remove(). 208 * Does NOT need to be called under an RCU read-critical section,
|
/qemu/include/hw/virtio/ |
H A D | vhost-user.h | 40 * @rcu: rcu_head for cleanup 48 * Once the RCU process has completed the unmap @unmap_addr is 52 struct rcu_head rcu; member
|
/qemu/include/system/ |
H A D | ramblock.h | 23 #include "qemu/rcu.h" 31 struct rcu_head rcu; member 42 /* RCU-enabled, writes protected by the ramlist lock */
|
/qemu/accel/tcg/ |
H A D | tb-jmp-cache.h | 12 #include "qemu/rcu.h" 26 struct rcu_head rcu; member
|
H A D | user-exec.c | 26 #include "qemu/rcu.h" 158 struct rcu_head rcu; member 297 g_free_rcu(p, rcu); in pageflags_unset() 341 g_free_rcu(next, rcu); in pageflags_create_merge() 406 g_free_rcu(p, rcu); in pageflags_set_clear() 451 g_free_rcu(p, rcu); in pageflags_set_clear() 492 g_free_rcu(p, rcu); in pageflags_set_clear() 891 struct rcu_head rcu; member 923 g_free_rcu(t, rcu); in page_reset_target_data()
|
/qemu/hw/display/ |
H A D | qxl.h | 161 * not protected by RCU anymore. If the caller is not within an RCU critical
|
/qemu/system/ |
H A D | physmem.c | 129 struct rcu_head rcu; member 168 * @memory_dispatch: its dispatch pointer (cached, RCU protected) 345 /* Called from RCU critical section */ 365 /* Called from RCU critical section */ 420 * This function is called from RCU critical section. It is the common 492 * This function is called from RCU critical section 531 /* Called from RCU critical section */ 568 /* Called from RCU critical section */ 683 /* Called from RCU critical section */ 768 /* Called from RCU critical section */ [all …]
|
/qemu/tests/qtest/fuzz/ |
H A D | fuzz.c | 24 #include "qemu/rcu.h" 230 /* re-enable the rcu atfork, which was previously disabled in qemu_init */ in LLVMFuzzerInitialize()
|