History

Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu

Pull RCU updates from Paul E. McKenney: - Expedited grace-period updates - kfree_rcu() updates - RCU list updates - Preemptible RCU updates - Torture-test updates - Miscellaneous fixes - Documentation updates

Ingo Molnar committed 6 years ago

Commit f8a4bb62 parents 4703d91 0e2473846 files · +1476 −851Browse files

Showing the changes to include/linux (9 of 46 files). Show all

Unified · Split

9 files
  1. include/linux/list.h +112 −24
  2. include/linux/list_nulls.h +26 −4
  3. include/linux/rcu_segcblist.h +0 −2
  4. include/linux/rculist.h +24 −14
  5. include/linux/rculist_nulls.h +14 −6
  6. include/linux/rcupdate.h +8 −20
  7. include/linux/rcutiny.h +1 −0
  8. include/linux/rcutree.h +1 −0
  9. include/linux/tick.h +4 −1
include/linux/list.h+112−24
@@ -23,6 +23,13 @@ · 22 unmodified lines
2323 #define LIST_HEAD(name) \
2424 struct list_head name = LIST_HEAD_INIT(name)
2525
26+/**
27+ * INIT_LIST_HEAD - Initialize a list_head structure
28+ * @list: list_head structure to be initialized.
29+ *
30+ * Initializes the list_head to point to itself. If it is a list header,
31+ * the result is an empty list.
32+ */
2633 static inline void INIT_LIST_HEAD(struct list_head *list)
2734 {
2835 WRITE_ONCE(list->next, list);
@@ -120,12 +127,6 @@ static inline void __list_del_clearprev(struct list_head *entry) · 91 unmodified lines
120127 entry->prev = NULL;
121128 }
122129
123−/**
124− * list_del - deletes entry from list.
125− * @entry: the element to delete from the list.
126− * Note: list_empty() on entry does not return true after this, the entry is
127− * in an undefined state.
128− */
129130 static inline void __list_del_entry(struct list_head *entry)
130131 {
131132 if (!__list_del_entry_valid(entry))
@@ -134,6 +135,12 @@ static inline void __list_del_entry(struct list_head *entry) · 2 unmodified lines
134135 __list_del(entry->prev, entry->next);
135136 }
136137
138+/**
139+ * list_del - deletes entry from list.
140+ * @entry: the element to delete from the list.
141+ * Note: list_empty() on entry does not return true after this, the entry is
142+ * in an undefined state.
143+ */
137144 static inline void list_del(struct list_head *entry)
138145 {
139146 __list_del_entry(entry);
@@ -157,8 +164,15 @@ static inline void list_replace(struct list_head *old, · 17 unmodified lines
157164 new->prev->next = new;
158165 }
159166
167+/**
168+ * list_replace_init - replace old entry by new one and initialize the old one
169+ * @old : the element to be replaced
170+ * @new : the new element to insert
171+ *
172+ * If @old was empty, it will be overwritten.
173+ */
160174 static inline void list_replace_init(struct list_head *old,
161− struct list_head *new)
175+ struct list_head *new)
162176 {
163177 list_replace(old, new);
164178 INIT_LIST_HEAD(old);
@@ -744,11 +758,36 @@ static inline void INIT_HLIST_NODE(struct hlist_node *h) · 579 unmodified lines
744758 h->pprev = NULL;
745759 }
746760
761+/**
762+ * hlist_unhashed - Has node been removed from list and reinitialized?
763+ * @h: Node to be checked
764+ *
765+ * Not that not all removal functions will leave a node in unhashed
766+ * state. For example, hlist_nulls_del_init_rcu() does leave the
767+ * node in unhashed state, but hlist_nulls_del() does not.
768+ */
747769 static inline int hlist_unhashed(const struct hlist_node *h)
748770 {
749771 return !h->pprev;
750772 }
751773
774+/**
775+ * hlist_unhashed_lockless - Version of hlist_unhashed for lockless use
776+ * @h: Node to be checked
777+ *
778+ * This variant of hlist_unhashed() must be used in lockless contexts
779+ * to avoid potential load-tearing. The READ_ONCE() is paired with the
780+ * various WRITE_ONCE() in hlist helpers that are defined below.
781+ */
782+static inline int hlist_unhashed_lockless(const struct hlist_node *h)
783+{
784+ return !READ_ONCE(h->pprev);
785+}
786+
787+/**
788+ * hlist_empty - Is the specified hlist_head structure an empty hlist?
789+ * @h: Structure to check.
790+ */
752791 static inline int hlist_empty(const struct hlist_head *h)
753792 {
754793 return !READ_ONCE(h->first);
@@ -761,9 +800,16 @@ static inline void __hlist_del(struct hlist_node *n) · 6 unmodified lines
761800
762801 WRITE_ONCE(*pprev, next);
763802 if (next)
764− next->pprev = pprev;
803+ WRITE_ONCE(next->pprev, pprev);
765804 }
766805
806+/**
807+ * hlist_del - Delete the specified hlist_node from its list
808+ * @n: Node to delete.
809+ *
810+ * Note that this function leaves the node in hashed state. Use
811+ * hlist_del_init() or similar instead to unhash @n.
812+ */
767813 static inline void hlist_del(struct hlist_node *n)
768814 {
769815 __hlist_del(n);
@@ -771,6 +817,12 @@ static inline void hlist_del(struct hlist_node *n) · 1 unmodified line
771817 n->pprev = LIST_POISON2;
772818 }
773819
820+/**
821+ * hlist_del_init - Delete the specified hlist_node from its list and initialize
822+ * @n: Node to delete.
823+ *
824+ * Note that this function leaves the node in unhashed state.
825+ */
774826 static inline void hlist_del_init(struct hlist_node *n)
775827 {
776828 if (!hlist_unhashed(n)) {
@@ -779,51 +831,83 @@ static inline void hlist_del_init(struct hlist_node *n) · 2 unmodified lines
779831 }
780832 }
781833
834+/**
835+ * hlist_add_head - add a new entry at the beginning of the hlist
836+ * @n: new entry to be added
837+ * @h: hlist head to add it after
838+ *
839+ * Insert a new entry after the specified head.
840+ * This is good for implementing stacks.
841+ */
782842 static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
783843 {
784844 struct hlist_node *first = h->first;
785− n->next = first;
845+ WRITE_ONCE(n->next, first);
786846 if (first)
787− first->pprev = &n->next;
847+ WRITE_ONCE(first->pprev, &n->next);
788848 WRITE_ONCE(h->first, n);
789− n->pprev = &h->first;
849+ WRITE_ONCE(n->pprev, &h->first);
790850 }
791851
792−/* next must be != NULL */
852+/**
853+ * hlist_add_before - add a new entry before the one specified
854+ * @n: new entry to be added
855+ * @next: hlist node to add it before, which must be non-NULL
856+ */
793857 static inline void hlist_add_before(struct hlist_node *n,
794− struct hlist_node *next)
858+ struct hlist_node *next)
795859 {
796− n->pprev = next->pprev;
797− n->next = next;
798− next->pprev = &n->next;
860+ WRITE_ONCE(n->pprev, next->pprev);
861+ WRITE_ONCE(n->next, next);
862+ WRITE_ONCE(next->pprev, &n->next);
799863 WRITE_ONCE(*(n->pprev), n);
800864 }
801865
866+/**
867+ * hlist_add_behing - add a new entry after the one specified
868+ * @n: new entry to be added
869+ * @prev: hlist node to add it after, which must be non-NULL
870+ */
802871 static inline void hlist_add_behind(struct hlist_node *n,
803872 struct hlist_node *prev)
804873 {
805− n->next = prev->next;
806− prev->next = n;
807− n->pprev = &prev->next;
874+ WRITE_ONCE(n->next, prev->next);
875+ WRITE_ONCE(prev->next, n);
876+ WRITE_ONCE(n->pprev, &prev->next);
808877
809878 if (n->next)
810− n->next->pprev = &n->next;
879+ WRITE_ONCE(n->next->pprev, &n->next);
811880 }
812881
813−/* after that we'll appear to be on some hlist and hlist_del will work */
882+/**
883+ * hlist_add_fake - create a fake hlist consisting of a single headless node
884+ * @n: Node to make a fake list out of
885+ *
886+ * This makes @n appear to be its own predecessor on a headless hlist.
887+ * The point of this is to allow things like hlist_del() to work correctly
888+ * in cases where there is no list.
889+ */
814890 static inline void hlist_add_fake(struct hlist_node *n)
815891 {
816892 n->pprev = &n->next;
817893 }
818894
895+/**
896+ * hlist_fake: Is this node a fake hlist?
897+ * @h: Node to check for being a self-referential fake hlist.
898+ */
819899 static inline bool hlist_fake(struct hlist_node *h)
820900 {
821901 return h->pprev == &h->next;
822902 }
823903
824−/*
904+/**
905+ * hlist_is_singular_node - is node the only element of the specified hlist?
906+ * @n: Node to check for singularity.
907+ * @h: Header for potentially singular list.
908+ *
825909 * Check whether the node is the only node of the head without
826− * accessing head:
910+ * accessing head, thus avoiding unnecessary cache misses.
827911 */
828912 static inline bool
829913 hlist_is_singular_node(struct hlist_node *n, struct hlist_head *h)
@@ -831,7 +915,11 @@ hlist_is_singular_node(struct hlist_node *n, struct hlist_head *h) · 1 unmodified line
831915 return !n->next && n->pprev == &h->first;
832916 }
833917
834−/*
918+/**
919+ * hlist_move_list - Move an hlist
920+ * @old: hlist_head for old list.
921+ * @new: hlist_head for new list.
922+ *
835923 * Move a list from one list head to another. Fixup the pprev
836924 * reference of the first entry if it exists.
837925 */
include/linux/list_nulls.h+26−4
@@ -56,11 +56,33 @@ static inline unsigned long get_nulls_value(const struct hlist_nulls_node *ptr) · 55 unmodified lines
5656 return ((unsigned long)ptr) >> 1;
5757 }
5858
59+/**
60+ * hlist_nulls_unhashed - Has node been removed and reinitialized?
61+ * @h: Node to be checked
62+ *
63+ * Not that not all removal functions will leave a node in unhashed state.
64+ * For example, hlist_del_init_rcu() leaves the node in unhashed state,
65+ * but hlist_nulls_del() does not.
66+ */
5967 static inline int hlist_nulls_unhashed(const struct hlist_nulls_node *h)
6068 {
6169 return !h->pprev;
6270 }
6371
72+/**
73+ * hlist_nulls_unhashed_lockless - Has node been removed and reinitialized?
74+ * @h: Node to be checked
75+ *
76+ * Not that not all removal functions will leave a node in unhashed state.
77+ * For example, hlist_del_init_rcu() leaves the node in unhashed state,
78+ * but hlist_nulls_del() does not. Unlike hlist_nulls_unhashed(), this
79+ * function may be used locklessly.
80+ */
81+static inline int hlist_nulls_unhashed_lockless(const struct hlist_nulls_node *h)
82+{
83+ return !READ_ONCE(h->pprev);
84+}
85+
6486 static inline int hlist_nulls_empty(const struct hlist_nulls_head *h)
6587 {
6688 return is_a_nulls(READ_ONCE(h->first));
@@ -72,10 +94,10 @@ static inline void hlist_nulls_add_head(struct hlist_nulls_node *n, · 5 unmodified lines
7294 struct hlist_nulls_node *first = h->first;
7395
7496 n->next = first;
75− n->pprev = &h->first;
97+ WRITE_ONCE(n->pprev, &h->first);
7698 h->first = n;
7799 if (!is_a_nulls(first))
78− first->pprev = &n->next;
100+ WRITE_ONCE(first->pprev, &n->next);
79101 }
80102
81103 static inline void __hlist_nulls_del(struct hlist_nulls_node *n)
@@ -85,13 +107,13 @@ static inline void __hlist_nulls_del(struct hlist_nulls_node *n) · 3 unmodified lines
85107
86108 WRITE_ONCE(*pprev, next);
87109 if (!is_a_nulls(next))
88− next->pprev = pprev;
110+ WRITE_ONCE(next->pprev, pprev);
89111 }
90112
91113 static inline void hlist_nulls_del(struct hlist_nulls_node *n)
92114 {
93115 __hlist_nulls_del(n);
94− n->pprev = LIST_POISON2;
116+ WRITE_ONCE(n->pprev, LIST_POISON2);
95117 }
96118
97119 /**
include/linux/rcu_segcblist.h+0−2
@@ -22,7 +22,6 @@ struct rcu_cblist { · 21 unmodified lines
2222 struct rcu_head *head;
2323 struct rcu_head **tail;
2424 long len;
25− long len_lazy;
2625 };
2726
2827 #define RCU_CBLIST_INITIALIZER(n) { .head = NULL, .tail = &n.head }
@@ -73,7 +72,6 @@ struct rcu_segcblist { · 44 unmodified lines
7372 #else
7473 long len;
7574 #endif
76− long len_lazy;
7775 u8 enabled;
7876 u8 offloaded;
7977 };
include/linux/rculist.h+24−14
@@ -40,6 +40,16 @@ static inline void INIT_LIST_HEAD_RCU(struct list_head *list) · 39 unmodified lines
4040 */
4141 #define list_next_rcu(list) (*((struct list_head __rcu **)(&(list)->next)))
4242
43+/**
44+ * list_tail_rcu - returns the prev pointer of the head of the list
45+ * @head: the head of the list
46+ *
47+ * Note: This should only be used with the list header, and even then
48+ * only if list_del() and similar primitives are not also used on the
49+ * list header.
50+ */
51+#define list_tail_rcu(head) (*((struct list_head __rcu **)(&(head)->prev)))
52+
4353 /*
4454 * Check during list traversal that we are within an RCU reader
4555 */
@@ -173,7 +183,7 @@ static inline void hlist_del_init_rcu(struct hlist_node *n) · 127 unmodified lines
173183 {
174184 if (!hlist_unhashed(n)) {
175185 __hlist_del(n);
176− n->pprev = NULL;
186+ WRITE_ONCE(n->pprev, NULL);
177187 }
178188 }
179189
@@ -361,7 +371,7 @@ static inline void list_splice_tail_init_rcu(struct list_head *list, · 181 unmodified lines
361371 * @pos: the type * to use as a loop cursor.
362372 * @head: the head for your list.
363373 * @member: the name of the list_head within the struct.
364− * @cond: optional lockdep expression if called from non-RCU protection.
374+ * @cond...: optional lockdep expression if called from non-RCU protection.
365375 *
366376 * This list-traversal primitive may safely run concurrently with
367377 * the _rcu list-mutation primitives such as list_add_rcu()
@@ -473,7 +483,7 @@ static inline void list_splice_tail_init_rcu(struct list_head *list, · 105 unmodified lines
473483 static inline void hlist_del_rcu(struct hlist_node *n)
474484 {
475485 __hlist_del(n);
476− n->pprev = LIST_POISON2;
486+ WRITE_ONCE(n->pprev, LIST_POISON2);
477487 }
478488
479489 /**
@@ -489,11 +499,11 @@ static inline void hlist_replace_rcu(struct hlist_node *old, · 9 unmodified lines
489499 struct hlist_node *next = old->next;
490500
491501 new->next = next;
492− new->pprev = old->pprev;
502+ WRITE_ONCE(new->pprev, old->pprev);
493503 rcu_assign_pointer(*(struct hlist_node __rcu **)new->pprev, new);
494504 if (next)
495− new->next->pprev = &new->next;
496− old->pprev = LIST_POISON2;
505+ WRITE_ONCE(new->next->pprev, &new->next);
506+ WRITE_ONCE(old->pprev, LIST_POISON2);
497507 }
498508
499509 /*
@@ -528,10 +538,10 @@ static inline void hlist_add_head_rcu(struct hlist_node *n, · 28 unmodified lines
528538 struct hlist_node *first = h->first;
529539
530540 n->next = first;
531− n->pprev = &h->first;
541+ WRITE_ONCE(n->pprev, &h->first);
532542 rcu_assign_pointer(hlist_first_rcu(h), n);
533543 if (first)
534− first->pprev = &n->next;
544+ WRITE_ONCE(first->pprev, &n->next);
535545 }
536546
537547 /**
@@ -564,7 +574,7 @@ static inline void hlist_add_tail_rcu(struct hlist_node *n, · 26 unmodified lines
564574
565575 if (last) {
566576 n->next = last->next;
567− n->pprev = &last->next;
577+ WRITE_ONCE(n->pprev, &last->next);
568578 rcu_assign_pointer(hlist_next_rcu(last), n);
569579 } else {
570580 hlist_add_head_rcu(n, h);
@@ -592,10 +602,10 @@ static inline void hlist_add_tail_rcu(struct hlist_node *n, · 21 unmodified lines
592602 static inline void hlist_add_before_rcu(struct hlist_node *n,
593603 struct hlist_node *next)
594604 {
595− n->pprev = next->pprev;
605+ WRITE_ONCE(n->pprev, next->pprev);
596606 n->next = next;
597607 rcu_assign_pointer(hlist_pprev_rcu(n), n);
598− next->pprev = &n->next;
608+ WRITE_ONCE(next->pprev, &n->next);
599609 }
600610
601611 /**
@@ -620,10 +630,10 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n, · 18 unmodified lines
620630 struct hlist_node *prev)
621631 {
622632 n->next = prev->next;
623− n->pprev = &prev->next;
633+ WRITE_ONCE(n->pprev, &prev->next);
624634 rcu_assign_pointer(hlist_next_rcu(prev), n);
625635 if (n->next)
626− n->next->pprev = &n->next;
636+ WRITE_ONCE(n->next->pprev, &n->next);
627637 }
628638
629639 #define __hlist_for_each_rcu(pos, head) \
@@ -636,7 +646,7 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n, · 6 unmodified lines
636646 * @pos: the type * to use as a loop cursor.
637647 * @head: the head for your list.
638648 * @member: the name of the hlist_node within the struct.
639− * @cond: optional lockdep expression if called from non-RCU protection.
649+ * @cond...: optional lockdep expression if called from non-RCU protection.
640650 *
641651 * This list-traversal primitive may safely run concurrently with
642652 * the _rcu list-mutation primitives such as hlist_add_head_rcu()
include/linux/rculist_nulls.h+14−6
@@ -34,13 +34,21 @@ static inline void hlist_nulls_del_init_rcu(struct hlist_nulls_node *n) · 33 unmodified lines
3434 {
3535 if (!hlist_nulls_unhashed(n)) {
3636 __hlist_nulls_del(n);
37− n->pprev = NULL;
37+ WRITE_ONCE(n->pprev, NULL);
3838 }
3939 }
4040
41+/**
42+ * hlist_nulls_first_rcu - returns the first element of the hash list.
43+ * @head: the head of the list.
44+ */
4145 #define hlist_nulls_first_rcu(head) \
4246 (*((struct hlist_nulls_node __rcu __force **)&(head)->first))
4347
48+/**
49+ * hlist_nulls_next_rcu - returns the element of the list after @node.
50+ * @node: element of the list.
51+ */
4452 #define hlist_nulls_next_rcu(node) \
4553 (*((struct hlist_nulls_node __rcu __force **)&(node)->next))
4654
@@ -66,7 +74,7 @@ static inline void hlist_nulls_del_init_rcu(struct hlist_nulls_node *n) · 19 unmodified lines
6674 static inline void hlist_nulls_del_rcu(struct hlist_nulls_node *n)
6775 {
6876 __hlist_nulls_del(n);
69− n->pprev = LIST_POISON2;
77+ WRITE_ONCE(n->pprev, LIST_POISON2);
7078 }
7179
7280 /**
@@ -94,10 +102,10 @@ static inline void hlist_nulls_add_head_rcu(struct hlist_nulls_node *n, · 21 unmodified lines
94102 struct hlist_nulls_node *first = h->first;
95103
96104 n->next = first;
97− n->pprev = &h->first;
105+ WRITE_ONCE(n->pprev, &h->first);
98106 rcu_assign_pointer(hlist_nulls_first_rcu(h), n);
99107 if (!is_a_nulls(first))
100− first->pprev = &n->next;
108+ WRITE_ONCE(first->pprev, &n->next);
101109 }
102110
103111 /**
@@ -141,7 +149,7 @@ static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n, · 37 unmodified lines
141149 * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type
142150 * @tpos: the type * to use as a loop cursor.
143151 * @pos: the &struct hlist_nulls_node to use as a loop cursor.
144− * @head: the head for your list.
152+ * @head: the head of the list.
145153 * @member: the name of the hlist_nulls_node within the struct.
146154 *
147155 * The barrier() is needed to make sure compiler doesn't cache first element [1],
@@ -161,7 +169,7 @@ static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n, · 13 unmodified lines
161169 * iterate over list of given type safe against removal of list entry
162170 * @tpos: the type * to use as a loop cursor.
163171 * @pos: the &struct hlist_nulls_node to use as a loop cursor.
164− * @head: the head for your list.
172+ * @head: the head of the list.
165173 * @member: the name of the hlist_nulls_node within the struct.
166174 */
167175 #define hlist_nulls_for_each_entry_safe(tpos, pos, head, member) \
include/linux/rcupdate.h+8−20
@@ -154,7 +154,7 @@ static inline void exit_tasks_rcu_finish(void) { } · 153 unmodified lines
154154 *
155155 * This macro resembles cond_resched(), except that it is defined to
156156 * report potential quiescent states to RCU-tasks even if the cond_resched()
157− * machinery were to be shut off, as some advocate for PREEMPT kernels.
157+ * machinery were to be shut off, as some advocate for PREEMPTION kernels.
158158 */
159159 #define cond_resched_tasks_rcu_qs() \
160160 do { \
@@ -167,7 +167,7 @@ do { \ · 6 unmodified lines
167167 * TREE_RCU and rcu_barrier_() primitives in TINY_RCU.
168168 */
169169
170−#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
170+#if defined(CONFIG_TREE_RCU)
171171 #include <linux/rcutree.h>
172172 #elif defined(CONFIG_TINY_RCU)
173173 #include <linux/rcutiny.h>
@@ -400,22 +400,6 @@ do { \ · 226 unmodified lines
400400 __tmp; \
401401 })
402402
403−/**
404− * rcu_swap_protected() - swap an RCU and a regular pointer
405− * @rcu_ptr: RCU pointer
406− * @ptr: regular pointer
407− * @c: the conditions under which the dereference will take place
408− *
409− * Perform swap(@rcu_ptr, @ptr) where @rcu_ptr is an RCU-annotated pointer and
410− * @c is the argument that is passed to the rcu_dereference_protected() call
411− * used to read that pointer.
412− */
413−#define rcu_swap_protected(rcu_ptr, ptr, c) do { \
414− typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \
415− rcu_assign_pointer((rcu_ptr), (ptr)); \
416− (ptr) = __tmp; \
417−} while (0)
418−
419403 /**
420404 * rcu_access_pointer() - fetch RCU pointer with no dereferencing
421405 * @p: The pointer to read
@@ -598,10 +582,10 @@ do { \ · 176 unmodified lines
598582 *
599583 * You can avoid reading and understanding the next paragraph by
600584 * following this rule: don't put anything in an rcu_read_lock() RCU
601− * read-side critical section that would block in a !PREEMPT kernel.
585+ * read-side critical section that would block in a !PREEMPTION kernel.
602586 * But if you want the full story, read on!
603587 *
604− * In non-preemptible RCU implementations (TREE_RCU and TINY_RCU),
588+ * In non-preemptible RCU implementations (pure TREE_RCU and TINY_RCU),
605589 * it is illegal to block while in an RCU read-side critical section.
606590 * In preemptible RCU implementations (PREEMPT_RCU) in CONFIG_PREEMPTION
607591 * kernel builds, RCU read-side critical sections may be preempted,
@@ -912,4 +896,8 @@ rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f) · 304 unmodified lines
912896 return false;
913897 }
914898
899+/* kernel/ksysfs.c definitions */
900+extern int rcu_expedited;
901+extern int rcu_normal;
902+
915903 #endif /* __LINUX_RCUPDATE_H */
include/linux/rcutiny.h+1−0
@@ -85,6 +85,7 @@ static inline void rcu_scheduler_starting(void) { } · 84 unmodified lines
8585 static inline void rcu_end_inkernel_boot(void) { }
8686 static inline bool rcu_is_watching(void) { return true; }
8787 static inline void rcu_momentary_dyntick_idle(void) { }
88+static inline void kfree_rcu_scheduler_running(void) { }
8889
8990 /* Avoid RCU read-side critical sections leaking across. */
9091 static inline void rcu_all_qs(void) { barrier(); }
include/linux/rcutree.h+1−0
@@ -38,6 +38,7 @@ void kfree_call_rcu(struct rcu_head *head, rcu_callback_t func); · 37 unmodified lines
3838 void rcu_barrier(void);
3939 bool rcu_eqs_special_set(int cpu);
4040 void rcu_momentary_dyntick_idle(void);
41+void kfree_rcu_scheduler_running(void);
4142 unsigned long get_state_synchronize_rcu(void);
4243 void cond_synchronize_rcu(unsigned long oldstate);
4344
include/linux/tick.h+4−1
@@ -109,8 +109,10 @@ enum tick_dep_bits { · 108 unmodified lines
109109 TICK_DEP_BIT_PERF_EVENTS = 1,
110110 TICK_DEP_BIT_SCHED = 2,
111111 TICK_DEP_BIT_CLOCK_UNSTABLE = 3,
112− TICK_DEP_BIT_RCU = 4
112+ TICK_DEP_BIT_RCU = 4,
113+ TICK_DEP_BIT_RCU_EXP = 5
113114 };
115+#define TICK_DEP_BIT_MAX TICK_DEP_BIT_RCU_EXP
114116
115117 #define TICK_DEP_MASK_NONE 0
116118 #define TICK_DEP_MASK_POSIX_TIMER (1 << TICK_DEP_BIT_POSIX_TIMER)
@@ -118,6 +120,7 @@ enum tick_dep_bits { · 1 unmodified line
118120 #define TICK_DEP_MASK_SCHED (1 << TICK_DEP_BIT_SCHED)
119121 #define TICK_DEP_MASK_CLOCK_UNSTABLE (1 << TICK_DEP_BIT_CLOCK_UNSTABLE)
120122 #define TICK_DEP_MASK_RCU (1 << TICK_DEP_BIT_RCU)
123+#define TICK_DEP_MASK_RCU_EXP (1 << TICK_DEP_BIT_RCU_EXP)
121124
122125 #ifdef CONFIG_NO_HZ_COMMON
123126 extern bool tick_nohz_enabled;