Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a1e001d authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'rcu/urgent' of...

Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

 into core/urgent

Merge RCU fixes from Paul E. McKenney:

 " This series has four patches, the major point of which is to eliminate
   some slowdowns (including boot-time slowdowns) resulting from some
   RCU_FAST_NO_HZ changes.  The issue with the changes is that posting timers
   from the idle loop has no effect if the CPU has entered dyntick-idle
   mode because the CPU has already computed its wakeup time, and posting
   a timer does not cause it to be recomputed.  The short-term fix is for
   RCU to precompute the timeout value so that the CPU's calculation is
   correct. "

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents eab30949 aa9b1630
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -87,8 +87,9 @@ static inline void kfree_call_rcu(struct rcu_head *head,

#ifdef CONFIG_TINY_RCU

static inline int rcu_needs_cpu(int cpu)
static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies)
{
	*delta_jiffies = ULONG_MAX;
	return 0;
}

@@ -96,8 +97,9 @@ static inline int rcu_needs_cpu(int cpu)

int rcu_preempt_needs_cpu(void);

static inline int rcu_needs_cpu(int cpu)
static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies)
{
	*delta_jiffies = ULONG_MAX;
	return rcu_preempt_needs_cpu();
}

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@

extern void rcu_init(void);
extern void rcu_note_context_switch(int cpu);
extern int rcu_needs_cpu(int cpu);
extern int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies);
extern void rcu_cpu_stall_reset(void);

/*
+1 −0
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ TRACE_EVENT(rcu_dyntick,
 *	"In holdoff": Nothing to do, holding off after unsuccessful attempt.
 *	"Begin holdoff": Attempt failed, don't retry until next jiffy.
 *	"Dyntick with callbacks": Entering dyntick-idle despite callbacks.
 *	"Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks.
 *	"More callbacks": Still more callbacks, try again to clear them out.
 *	"Callbacks drained": All callbacks processed, off to dyntick idle!
 *	"Timer": Timer fired to cause CPU to continue processing callbacks.
+2 −0
Original line number Diff line number Diff line
@@ -1397,6 +1397,8 @@ static void rcu_adopt_orphan_cbs(struct rcu_state *rsp)
	rdp->qlen_lazy += rsp->qlen_lazy;
	rdp->qlen += rsp->qlen;
	rdp->n_cbs_adopted += rsp->qlen;
	if (rsp->qlen_lazy != rsp->qlen)
		rcu_idle_count_callbacks_posted();
	rsp->qlen_lazy = 0;
	rsp->qlen = 0;

+14 −0
Original line number Diff line number Diff line
@@ -84,6 +84,20 @@ struct rcu_dynticks {
				    /* Process level is worth LLONG_MAX/2. */
	int dynticks_nmi_nesting;   /* Track NMI nesting level. */
	atomic_t dynticks;	    /* Even value for idle, else odd. */
#ifdef CONFIG_RCU_FAST_NO_HZ
	int dyntick_drain;	    /* Prepare-for-idle state variable. */
	unsigned long dyntick_holdoff;
				    /* No retries for the jiffy of failure. */
	struct timer_list idle_gp_timer;
				    /* Wake up CPU sleeping with callbacks. */
	unsigned long idle_gp_timer_expires;
				    /* When to wake up CPU (for repost). */
	bool idle_first_pass;	    /* First pass of attempt to go idle? */
	unsigned long nonlazy_posted;
				    /* # times non-lazy CBs posted to CPU. */
	unsigned long nonlazy_posted_snap;
				    /* idle-period nonlazy_posted snapshot. */
#endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
};

/* RCU's kthread states for tracing. */
Loading