History

rcuscale: Warn on individual rcu_scale_init() error conditions

When running rcuscale as a module, any rcu_scale_init() issues will be reflected in the error code from modprobe or insmod, as the case may be. However, these error codes are not available when running rcuscale built-in, for example, when using the kvm.sh script. This commit therefore adds WARN_ON_ONCE() to allow distinguishing rcu_scale_init() errors when running rcuscale built-in.

Paul E. McKenney committed 5 years ago

Commit eb77abf1 parent ed60ad71 file · +5 −5Browse files

Unified · Split

kernel/rcu/rcuscale.c+5−5
@@ -758,7 +758,7 @@ kfree_scale_init(void) · 757 unmodified lines
758758 init_waitqueue_head(&shutdown_wq);
759759 firsterr = torture_create_kthread(kfree_scale_shutdown, NULL,
760760 shutdown_task);
761− if (firsterr)
761+ if (torture_init_error(firsterr))
762762 goto unwind;
763763 schedule_timeout_uninterruptible(1);
764764 }
@@ -775,7 +775,7 @@ kfree_scale_init(void) · 10 unmodified lines
775775 for (i = 0; i < kfree_nrealthreads; i++) {
776776 firsterr = torture_create_kthread(kfree_scale_thread, (void *)i,
777777 kfree_reader_tasks[i]);
778− if (firsterr)
778+ if (torture_init_error(firsterr))
779779 goto unwind;
780780 }
781781
@@ -838,7 +838,7 @@ rcu_scale_init(void) · 56 unmodified lines
838838 init_waitqueue_head(&shutdown_wq);
839839 firsterr = torture_create_kthread(rcu_scale_shutdown, NULL,
840840 shutdown_task);
841− if (firsterr)
841+ if (torture_init_error(firsterr))
842842 goto unwind;
843843 schedule_timeout_uninterruptible(1);
844844 }
@@ -852,7 +852,7 @@ rcu_scale_init(void) · 7 unmodified lines
852852 for (i = 0; i < nrealreaders; i++) {
853853 firsterr = torture_create_kthread(rcu_scale_reader, (void *)i,
854854 reader_tasks[i]);
855− if (firsterr)
855+ if (torture_init_error(firsterr))
856856 goto unwind;
857857 }
858858 while (atomic_read(&n_rcu_scale_reader_started) < nrealreaders)
@@ -879,7 +879,7 @@ rcu_scale_init(void) · 20 unmodified lines
879879 }
880880 firsterr = torture_create_kthread(rcu_scale_writer, (void *)i,
881881 writer_tasks[i]);
882− if (firsterr)
882+ if (torture_init_error(firsterr))
883883 goto unwind;
884884 }
885885 torture_init_end();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t