tree_stall.h (4f2c0a4acffbec01079c28f839422e64ddeff004) | tree_stall.h (be42f00b73a0f50710d16eb7cb4efda0cce062dd) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * RCU CPU stall warnings for normal RCU grace periods 4 * 5 * Copyright IBM Corporation, 2019 6 * 7 * Author: Paul E. McKenney <paulmck@linux.ibm.com> 8 */ --- 414 unchanged lines hidden (view full) --- 423 424 j = jiffies - READ_ONCE(rdp->rcuc_activity); 425 426 if (jp) 427 *jp = j; 428 return j > 2 * HZ; 429} 430 | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * RCU CPU stall warnings for normal RCU grace periods 4 * 5 * Copyright IBM Corporation, 2019 6 * 7 * Author: Paul E. McKenney <paulmck@linux.ibm.com> 8 */ --- 414 unchanged lines hidden (view full) --- 423 424 j = jiffies - READ_ONCE(rdp->rcuc_activity); 425 426 if (jp) 427 *jp = j; 428 return j > 2 * HZ; 429} 430 |
431static void print_cpu_stat_info(int cpu) 432{ 433 struct rcu_snap_record rsr, *rsrp; 434 struct rcu_data *rdp = per_cpu_ptr(&rcu_data, cpu); 435 struct kernel_cpustat *kcsp = &kcpustat_cpu(cpu); 436 437 if (!rcu_cpu_stall_cputime) 438 return; 439 440 rsrp = &rdp->snap_record; 441 if (rsrp->gp_seq != rdp->gp_seq) 442 return; 443 444 rsr.cputime_irq = kcpustat_field(kcsp, CPUTIME_IRQ, cpu); 445 rsr.cputime_softirq = kcpustat_field(kcsp, CPUTIME_SOFTIRQ, cpu); 446 rsr.cputime_system = kcpustat_field(kcsp, CPUTIME_SYSTEM, cpu); 447 448 pr_err("\t hardirqs softirqs csw/system\n"); 449 pr_err("\t number: %8ld %10d %12lld\n", 450 kstat_cpu_irqs_sum(cpu) - rsrp->nr_hardirqs, 451 kstat_cpu_softirqs_sum(cpu) - rsrp->nr_softirqs, 452 nr_context_switches_cpu(cpu) - rsrp->nr_csw); 453 pr_err("\tcputime: %8lld %10lld %12lld ==> %d(ms)\n", 454 div_u64(rsr.cputime_irq - rsrp->cputime_irq, NSEC_PER_MSEC), 455 div_u64(rsr.cputime_softirq - rsrp->cputime_softirq, NSEC_PER_MSEC), 456 div_u64(rsr.cputime_system - rsrp->cputime_system, NSEC_PER_MSEC), 457 jiffies_to_msecs(jiffies - rsrp->jiffies)); 458} 459 |
|
431/* 432 * Print out diagnostic information for the specified stalled CPU. 433 * 434 * If the specified CPU is aware of the current RCU grace period, then 435 * print the number of scheduling clock interrupts the CPU has taken 436 * during the time that it has been aware. Otherwise, print the number 437 * of RCU grace periods that this CPU is ignorant of, for example, "1" 438 * if the CPU was aware of the previous grace period. --- 40 unchanged lines hidden (view full) --- 479 "!."[!delta], 480 ticks_value, ticks_title, 481 rcu_dynticks_snap(cpu) & 0xffff, 482 ct_dynticks_nesting_cpu(cpu), ct_dynticks_nmi_nesting_cpu(cpu), 483 rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu), 484 data_race(rcu_state.n_force_qs) - rcu_state.n_force_qs_gpstart, 485 rcuc_starved ? buf : "", 486 falsepositive ? " (false positive?)" : ""); | 460/* 461 * Print out diagnostic information for the specified stalled CPU. 462 * 463 * If the specified CPU is aware of the current RCU grace period, then 464 * print the number of scheduling clock interrupts the CPU has taken 465 * during the time that it has been aware. Otherwise, print the number 466 * of RCU grace periods that this CPU is ignorant of, for example, "1" 467 * if the CPU was aware of the previous grace period. --- 40 unchanged lines hidden (view full) --- 508 "!."[!delta], 509 ticks_value, ticks_title, 510 rcu_dynticks_snap(cpu) & 0xffff, 511 ct_dynticks_nesting_cpu(cpu), ct_dynticks_nmi_nesting_cpu(cpu), 512 rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu), 513 data_race(rcu_state.n_force_qs) - rcu_state.n_force_qs_gpstart, 514 rcuc_starved ? buf : "", 515 falsepositive ? " (false positive?)" : ""); |
516 517 print_cpu_stat_info(cpu); |
|
487} 488 489/* Complain about starvation of grace-period kthread. */ 490static void rcu_check_gp_kthread_starvation(void) 491{ 492 int cpu; 493 struct task_struct *gpk = rcu_state.gp_kthread; 494 unsigned long j; --- 531 unchanged lines hidden --- | 518} 519 520/* Complain about starvation of grace-period kthread. */ 521static void rcu_check_gp_kthread_starvation(void) 522{ 523 int cpu; 524 struct task_struct *gpk = rcu_state.gp_kthread; 525 unsigned long j; --- 531 unchanged lines hidden --- |