rcutorture.c (9cf8fc6fabd46d7f4729529f88d627ce85c6e970) | rcutorture.c (3d6e43c75d6bab212e8bc142585ee36eb8e2e5d9) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Read-Copy Update module-based torture test facility 4 * 5 * Copyright (C) IBM Corporation, 2005, 2006 6 * 7 * Authors: Paul E. McKenney <paulmck@linux.ibm.com> 8 * Josh Triplett <josh@joshtriplett.org> --- 716 unchanged lines hidden (view full) --- 725 .sync = synchronize_rcu_trivial, 726 .exp_sync = synchronize_rcu_trivial, 727 .fqs = NULL, 728 .stats = NULL, 729 .irq_capable = 1, 730 .name = "trivial" 731}; 732 | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Read-Copy Update module-based torture test facility 4 * 5 * Copyright (C) IBM Corporation, 2005, 2006 6 * 7 * Authors: Paul E. McKenney <paulmck@linux.ibm.com> 8 * Josh Triplett <josh@joshtriplett.org> --- 716 unchanged lines hidden (view full) --- 725 .sync = synchronize_rcu_trivial, 726 .exp_sync = synchronize_rcu_trivial, 727 .fqs = NULL, 728 .stats = NULL, 729 .irq_capable = 1, 730 .name = "trivial" 731}; 732 |
733/* 734 * Definitions for rude RCU-tasks torture testing. 735 */ 736 737static void rcu_tasks_rude_torture_deferred_free(struct rcu_torture *p) 738{ 739 call_rcu_tasks_rude(&p->rtort_rcu, rcu_torture_cb); 740} 741 742static struct rcu_torture_ops tasks_rude_ops = { 743 .ttype = RCU_TASKS_RUDE_FLAVOR, 744 .init = rcu_sync_torture_init, 745 .readlock = rcu_torture_read_lock_trivial, 746 .read_delay = rcu_read_delay, /* just reuse rcu's version. */ 747 .readunlock = rcu_torture_read_unlock_trivial, 748 .get_gp_seq = rcu_no_completed, 749 .deferred_free = rcu_tasks_rude_torture_deferred_free, 750 .sync = synchronize_rcu_tasks_rude, 751 .exp_sync = synchronize_rcu_tasks_rude, 752 .call = call_rcu_tasks_rude, 753 .cb_barrier = rcu_barrier_tasks_rude, 754 .fqs = NULL, 755 .stats = NULL, 756 .irq_capable = 1, 757 .name = "tasks-rude" 758}; 759 |
|
733static unsigned long rcutorture_seq_diff(unsigned long new, unsigned long old) 734{ 735 if (!cur_ops->gp_diff) 736 return new - old; 737 return cur_ops->gp_diff(new, old); 738} 739 740static bool __maybe_unused torturing_tasks(void) 741{ | 760static unsigned long rcutorture_seq_diff(unsigned long new, unsigned long old) 761{ 762 if (!cur_ops->gp_diff) 763 return new - old; 764 return cur_ops->gp_diff(new, old); 765} 766 767static bool __maybe_unused torturing_tasks(void) 768{ |
742 return cur_ops == &tasks_ops; | 769 return cur_ops == &tasks_ops || cur_ops == &tasks_rude_ops; |
743} 744 745/* 746 * RCU torture priority-boost testing. Runs one real-time thread per 747 * CPU for moderate bursts, repeatedly registering RCU callbacks and 748 * spinning waiting for them to be invoked. If a given callback takes 749 * too long to be invoked, we assume that priority inversion has occurred. 750 */ --- 1657 unchanged lines hidden (view full) --- 2408static int __init 2409rcu_torture_init(void) 2410{ 2411 long i; 2412 int cpu; 2413 int firsterr = 0; 2414 static struct rcu_torture_ops *torture_ops[] = { 2415 &rcu_ops, &rcu_busted_ops, &srcu_ops, &srcud_ops, | 770} 771 772/* 773 * RCU torture priority-boost testing. Runs one real-time thread per 774 * CPU for moderate bursts, repeatedly registering RCU callbacks and 775 * spinning waiting for them to be invoked. If a given callback takes 776 * too long to be invoked, we assume that priority inversion has occurred. 777 */ --- 1657 unchanged lines hidden (view full) --- 2435static int __init 2436rcu_torture_init(void) 2437{ 2438 long i; 2439 int cpu; 2440 int firsterr = 0; 2441 static struct rcu_torture_ops *torture_ops[] = { 2442 &rcu_ops, &rcu_busted_ops, &srcu_ops, &srcud_ops, |
2416 &busted_srcud_ops, &tasks_ops, &trivial_ops, | 2443 &busted_srcud_ops, &tasks_ops, &tasks_rude_ops, &trivial_ops, |
2417 }; 2418 2419 if (!torture_init_begin(torture_type, verbose)) 2420 return -EBUSY; 2421 2422 /* Process args and tell the world that the torturer is on the job. */ 2423 for (i = 0; i < ARRAY_SIZE(torture_ops); i++) { 2424 cur_ops = torture_ops[i]; --- 175 unchanged lines hidden --- | 2444 }; 2445 2446 if (!torture_init_begin(torture_type, verbose)) 2447 return -EBUSY; 2448 2449 /* Process args and tell the world that the torturer is on the job. */ 2450 for (i = 0; i < ARRAY_SIZE(torture_ops); i++) { 2451 cur_ops = torture_ops[i]; --- 175 unchanged lines hidden --- |