Skip to content

Commit 87492c0

Browse files
committed
Merge branches 'doc.2022.10.20a', 'fixes.2022.10.21a', 'lazy.2022.11.30a', 'srcunmisafe.2022.11.09a', 'torture.2022.10.18c' and 'torturescript.2022.10.20a' into HEAD
doc.2022.10.20a: Documentation updates. fixes.2022.10.21a: Miscellaneous fixes. lazy.2022.11.30a: Lazy call_rcu() and NOCB updates. srcunmisafe.2022.11.09a: NMI-safe SRCU readers. torture.2022.10.18c: Torture-test updates. torturescript.2022.10.20a: Torture-test scripting updates.
6 parents 2c3cdf5 + ceb1c8c + 9d40c84 + f733615 + 1324d95 + f7dd164 commit 87492c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+909
-240
lines changed

arch/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
468468
config ARCH_HAVE_NMI_SAFE_CMPXCHG
469469
bool
470470

471+
config ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
472+
bool
473+
471474
config HAVE_ALIGNED_STRUCT_PAGE
472475
bool
473476
help

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ config ARM64
3131
select ARCH_HAS_KCOV
3232
select ARCH_HAS_KEEPINITRD
3333
select ARCH_HAS_MEMBARRIER_SYNC_CORE
34+
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
3435
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
3536
select ARCH_HAS_PTE_DEVMAP
3637
select ARCH_HAS_PTE_SPECIAL

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ config LOONGARCH
1010
select ARCH_ENABLE_MEMORY_HOTPLUG
1111
select ARCH_ENABLE_MEMORY_HOTREMOVE
1212
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
13+
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
1314
select ARCH_HAS_PTE_SPECIAL
1415
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
1516
select ARCH_INLINE_READ_LOCK if !PREEMPTION

arch/s390/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ config S390
7373
select ARCH_HAS_GIGANTIC_PAGE
7474
select ARCH_HAS_KCOV
7575
select ARCH_HAS_MEM_ENCRYPT
76+
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
7677
select ARCH_HAS_PTE_SPECIAL
7778
select ARCH_HAS_SCALED_CPUTIME
7879
select ARCH_HAS_SET_MEMORY

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ config X86
8181
select ARCH_HAS_KCOV if X86_64
8282
select ARCH_HAS_MEM_ENCRYPT
8383
select ARCH_HAS_MEMBARRIER_SYNC_CORE
84+
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
8485
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
8586
select ARCH_HAS_PMEM_API if X86_64
8687
select ARCH_HAS_PTE_DEVMAP if X86_64

drivers/scsi/scsi_error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ void scsi_eh_scmd_add(struct scsi_cmnd *scmd)
312312
* Ensure that all tasks observe the host state change before the
313313
* host_failed change.
314314
*/
315-
call_rcu(&scmd->rcu, scsi_eh_inc_host_failed);
315+
call_rcu_hurry(&scmd->rcu, scsi_eh_inc_host_failed);
316316
}
317317

318318
/**

include/linux/kvm_host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static __always_inline void guest_context_enter_irqoff(void)
416416
*/
417417
if (!context_tracking_guest_enter()) {
418418
instrumentation_begin();
419-
rcu_virt_note_context_switch(smp_processor_id());
419+
rcu_virt_note_context_switch();
420420
instrumentation_end();
421421
}
422422
}

include/linux/rcupdate.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ static inline int rcu_preempt_depth(void)
108108

109109
#endif /* #else #ifdef CONFIG_PREEMPT_RCU */
110110

111+
#ifdef CONFIG_RCU_LAZY
112+
void call_rcu_hurry(struct rcu_head *head, rcu_callback_t func);
113+
#else
114+
static inline void call_rcu_hurry(struct rcu_head *head, rcu_callback_t func)
115+
{
116+
call_rcu(head, func);
117+
}
118+
#endif
119+
111120
/* Internal to kernel */
112121
void rcu_init(void);
113122
extern int rcu_scheduler_active;
@@ -340,6 +349,11 @@ static inline int rcu_read_lock_any_held(void)
340349
return !preemptible();
341350
}
342351

352+
static inline int debug_lockdep_rcu_enabled(void)
353+
{
354+
return 0;
355+
}
356+
343357
#endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */
344358

345359
#ifdef CONFIG_PROVE_RCU

include/linux/rcutiny.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,10 @@ static inline int rcu_needs_cpu(void)
142142
* Take advantage of the fact that there is only one CPU, which
143143
* allows us to ignore virtualization-based context switches.
144144
*/
145-
static inline void rcu_virt_note_context_switch(int cpu) { }
145+
static inline void rcu_virt_note_context_switch(void) { }
146146
static inline void rcu_cpu_stall_reset(void) { }
147147
static inline int rcu_jiffies_till_stall_check(void) { return 21 * HZ; }
148148
static inline void rcu_irq_exit_check_preempt(void) { }
149-
#define rcu_is_idle_cpu(cpu) \
150-
(is_idle_task(current) && !in_nmi() && !in_hardirq() && !in_serving_softirq())
151149
static inline void exit_rcu(void) { }
152150
static inline bool rcu_preempt_need_deferred_qs(struct task_struct *t)
153151
{

include/linux/rcutree.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void rcu_cpu_stall_reset(void);
2727
* wrapper around rcu_note_context_switch(), which allows TINY_RCU
2828
* to save a few bytes. The caller must have disabled interrupts.
2929
*/
30-
static inline void rcu_virt_note_context_switch(int cpu)
30+
static inline void rcu_virt_note_context_switch(void)
3131
{
3232
rcu_note_context_switch(false);
3333
}
@@ -87,8 +87,6 @@ bool poll_state_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp);
8787
void cond_synchronize_rcu(unsigned long oldstate);
8888
void cond_synchronize_rcu_full(struct rcu_gp_oldstate *rgosp);
8989

90-
bool rcu_is_idle_cpu(int cpu);
91-
9290
#ifdef CONFIG_PROVE_RCU
9391
void rcu_irq_exit_check_preempt(void);
9492
#else

0 commit comments

Comments
 (0)