mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
rcu: Shrink ->dynticks_{nmi_,}nesting from long long to long
Because the ->dynticks_nesting field now only contains the process-based nesting level instead of a value encoding both the process nesting level and the irq "nesting" level, we no longer need a long long, even on 32-bit systems. This commit therefore changes both the ->dynticks_nesting and ->dynticks_nmi_nesting fields to long. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
bd2b879a1c
commit
84585aa8b6
@ -436,14 +436,14 @@ TRACE_EVENT(rcu_fqs,
|
|||||||
*/
|
*/
|
||||||
TRACE_EVENT(rcu_dyntick,
|
TRACE_EVENT(rcu_dyntick,
|
||||||
|
|
||||||
TP_PROTO(const char *polarity, long long oldnesting, long long newnesting),
|
TP_PROTO(const char *polarity, long oldnesting, long newnesting),
|
||||||
|
|
||||||
TP_ARGS(polarity, oldnesting, newnesting),
|
TP_ARGS(polarity, oldnesting, newnesting),
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
__field(const char *, polarity)
|
__field(const char *, polarity)
|
||||||
__field(long long, oldnesting)
|
__field(long, oldnesting)
|
||||||
__field(long long, newnesting)
|
__field(long, newnesting)
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
@ -452,7 +452,7 @@ TRACE_EVENT(rcu_dyntick,
|
|||||||
__entry->newnesting = newnesting;
|
__entry->newnesting = newnesting;
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("%s %llx %llx", __entry->polarity,
|
TP_printk("%s %lx %lx", __entry->polarity,
|
||||||
__entry->oldnesting, __entry->newnesting)
|
__entry->oldnesting, __entry->newnesting)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#endif /* #else #ifdef CONFIG_RCU_TRACE */
|
#endif /* #else #ifdef CONFIG_RCU_TRACE */
|
||||||
|
|
||||||
/* Offset to allow for unmatched rcu_irq_{enter,exit}(). */
|
/* Offset to allow for unmatched rcu_irq_{enter,exit}(). */
|
||||||
#define DYNTICK_IRQ_NONIDLE ((INT_MAX / 2) + 1)
|
#define DYNTICK_IRQ_NONIDLE ((LONG_MAX / 2) + 1)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -946,7 +946,7 @@ void rcu_irq_exit_irqson(void)
|
|||||||
* we really have exited idle, and must do the appropriate accounting.
|
* we really have exited idle, and must do the appropriate accounting.
|
||||||
* The caller must have disabled interrupts.
|
* The caller must have disabled interrupts.
|
||||||
*/
|
*/
|
||||||
static void rcu_eqs_exit_common(long long newval, int user)
|
static void rcu_eqs_exit_common(long newval, int user)
|
||||||
{
|
{
|
||||||
RCU_TRACE(struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);)
|
RCU_TRACE(struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);)
|
||||||
|
|
||||||
@ -979,7 +979,7 @@ static void rcu_eqs_exit_common(long long newval, int user)
|
|||||||
static void rcu_eqs_exit(bool user)
|
static void rcu_eqs_exit(bool user)
|
||||||
{
|
{
|
||||||
struct rcu_dynticks *rdtp;
|
struct rcu_dynticks *rdtp;
|
||||||
long long oldval;
|
long oldval;
|
||||||
|
|
||||||
lockdep_assert_irqs_disabled();
|
lockdep_assert_irqs_disabled();
|
||||||
rdtp = this_cpu_ptr(&rcu_dynticks);
|
rdtp = this_cpu_ptr(&rcu_dynticks);
|
||||||
@ -1043,7 +1043,7 @@ void rcu_user_exit(void)
|
|||||||
void rcu_nmi_enter(void)
|
void rcu_nmi_enter(void)
|
||||||
{
|
{
|
||||||
struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
|
struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
|
||||||
int incby = 2;
|
long incby = 2;
|
||||||
|
|
||||||
/* Complain about underflow. */
|
/* Complain about underflow. */
|
||||||
WARN_ON_ONCE(rdtp->dynticks_nmi_nesting < 0);
|
WARN_ON_ONCE(rdtp->dynticks_nmi_nesting < 0);
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
* Dynticks per-CPU state.
|
* Dynticks per-CPU state.
|
||||||
*/
|
*/
|
||||||
struct rcu_dynticks {
|
struct rcu_dynticks {
|
||||||
long long dynticks_nesting; /* Track irq/process nesting level. */
|
long dynticks_nesting; /* Track process nesting level. */
|
||||||
int dynticks_nmi_nesting; /* Track NMI nesting level. */
|
long dynticks_nmi_nesting; /* Track irq/NMI nesting level. */
|
||||||
atomic_t dynticks; /* Even value for idle, else odd. */
|
atomic_t dynticks; /* Even value for idle, else odd. */
|
||||||
bool rcu_need_heavy_qs; /* GP old, need heavy quiescent state. */
|
bool rcu_need_heavy_qs; /* GP old, need heavy quiescent state. */
|
||||||
unsigned long rcu_qs_ctr; /* Light universal quiescent state ctr. */
|
unsigned long rcu_qs_ctr; /* Light universal quiescent state ctr. */
|
||||||
|
@ -1687,7 +1687,7 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
|
|||||||
}
|
}
|
||||||
print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
|
print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
|
||||||
delta = rdp->mynode->gpnum - rdp->rcu_iw_gpnum;
|
delta = rdp->mynode->gpnum - rdp->rcu_iw_gpnum;
|
||||||
pr_err("\t%d-%c%c%c%c: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u fqs=%ld %s\n",
|
pr_err("\t%d-%c%c%c%c: (%lu %s) idle=%03x/%ld/%ld softirq=%u/%u fqs=%ld %s\n",
|
||||||
cpu,
|
cpu,
|
||||||
"O."[!!cpu_online(cpu)],
|
"O."[!!cpu_online(cpu)],
|
||||||
"o."[!!(rdp->grpmask & rdp->mynode->qsmaskinit)],
|
"o."[!!(rdp->grpmask & rdp->mynode->qsmaskinit)],
|
||||||
|
Loading…
Reference in New Issue
Block a user