Home
last modified time | relevance | path

Searched full:rcu (Results 1 – 25 of 78) sorted by relevance

1234

/qemu/docs/devel/
H A Drcu.rst1 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 Dlockcnt.rst49 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 Dindex-internals.rst13 rcu
H A Dtcg-plugins.rst143 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 Dramlist.h6 #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 Drcutorture.c2 * 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 Dtest-rcu-list.c24 #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 Dmeson.build33 'test-rcu-list': [],
34 'test-rcu-simpleq': [],
35 'test-rcu-tailq': [],
36 'test-rcu-slist': [],
H A Dtest-logging.c32 #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 Dtest-rcu-tailq.c2 #include "test-rcu-list.c"
H A Dtest-rcu-slist.c2 #include "test-rcu-list.c"
H A Dtest-rcu-simpleq.c2 #include "test-rcu-list.c"
/qemu/util/
H A Drcu.c4 * 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 Dqht.c14 * - 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 Dqsp.c48 * - 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 Drcu_queue.h7 * 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 Drcu.h7 * 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 Dqht.h97 * 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 Dvhost-user.h40 * @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 Dramblock.h23 #include "qemu/rcu.h"
31 struct rcu_head rcu; member
42 /* RCU-enabled, writes protected by the ramlist lock */
/qemu/accel/tcg/
H A Dtb-jmp-cache.h12 #include "qemu/rcu.h"
26 struct rcu_head rcu; member
H A Duser-exec.c26 #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 Dqxl.h161 * not protected by RCU anymore. If the caller is not within an RCU critical
/qemu/system/
H A Dphysmem.c129 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 Dfuzz.c24 #include "qemu/rcu.h"
230 /* re-enable the rcu atfork, which was previously disabled in qemu_init */ in LLVMFuzzerInitialize()

1234