All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Christoph Lameter <cl@linux.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [GIT PULL] nohz: Tick dependency mask v2
Date: Tue, 8 Mar 2016 14:14:23 +0100	[thread overview]
Message-ID: <20160308131423.GA5646@gmail.com> (raw)
In-Reply-To: <20160303004658.GA1749@lerouge>


* Frederic Weisbecker <fweisbec@gmail.com> wrote:

> On Tue, Feb 16, 2016 at 09:03:45AM +0100, Ingo Molnar wrote:
> > 
> > 
> > So I think it would be useful to name this in a way the expresses that this is a 
> > mask.
> > 
> > 'tick_dep_mask' or so?
> 
> [...]
> 
> > >  
> > > +enum tick_dependency_bit {
> > 
> > s/tick_dep_bits
> > 
> > > +	TICK_POSIX_TIMER_BIT	= 0,
> > > +	TICK_PERF_EVENTS_BIT	= 1,
> > > +	TICK_SCHED_BIT		= 2,
> > > +	TICK_CLOCK_UNSTABLE_BIT	= 3
> > 
> > s/TICK_DEP_BIT_...
> > 
> > > +};
> > > +
> > > +#define TICK_POSIX_TIMER_MASK		(1 << TICK_POSIX_TIMER_BIT)
> > > +#define TICK_PERF_EVENTS_MASK		(1 << TICK_PERF_EVENTS_BIT)
> > > +#define TICK_SCHED_MASK			(1 << TICK_SCHED_BIT)
> > > +#define TICK_CLOCK_UNSTABLE_MASK	(1 << TICK_CLOCK_UNSTABLE_BIT)
> > 
> > So I'd rename this to:
> > 
> > #define TICK_DEP_MASK_POSIX_TIMER	(1 << TICK_POSIX_TIMER_BIT)
> > #define TICK_DEP_MASK_PERF_EVENTS	(1 << TICK_PERF_EVENTS_BIT)
> > #define TICK_DEP_MASK_SCHED		(1 << TICK_SCHED_BIT)
> > #define TICK_DEP_MASK_CLOCK_UNSTABLE	(1 << TICK_CLOCK_UNSTABLE_BIT)
> > 
> > i.e. the 'tick_dep' and 'TICK_DEP' nomenclature would be used throughout the code 
> > and the pattern would be easy to grep for.
> > 
> > > +extern void tick_nohz_set_dep(enum tick_dependency_bit bit);
> > > +extern void tick_nohz_clear_dep(enum tick_dependency_bit bit);
> > > +extern void tick_nohz_set_dep_cpu(int cpu, enum tick_dependency_bit bit);
> > > +extern void tick_nohz_clear_dep_cpu(int cpu, enum tick_dependency_bit bit);
> > > +extern void tick_nohz_set_dep_task(struct task_struct *tsk,
> > > +				   enum tick_dependency_bit bit);
> > > +extern void tick_nohz_clear_dep_task(struct task_struct *tsk,
> > > +				     enum tick_dependency_bit bit);
> > > +extern void tick_nohz_set_dep_signal(struct signal_struct *signal,
> > > +				     enum tick_dependency_bit bit);
> > > +extern void tick_nohz_clear_dep_signal(struct signal_struct *signal,
> > > +				       enum tick_dependency_bit bit);
> > 
> > Ditto, please rename it all to:
> > 
> > 	tick_dep_set()
> > 	tick_dep_clear()
> > 	tick_dep_set_cpu()
> > 	tick_dep_clear_cpu()
> > 	tick_dep_set_task()
> > 	...
> 
> Ok, I fixed all the above.
> 
> > 
> > also, please don't line-break function prototypes, it only makes the result harder 
> > to read.
> 
> I couldn't fix that though, I'm limited by the 80 columns.
> 
> 
> If you're ok with it, please pull the branch:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
> 	timers/core-v9
> 
> HEAD: 4f49b90abb4aca6fe677c95fc352fd0674d489bd
> 
> --- Summary ---
> 
> Currently in nohz full configs, the tick dependency is checked
> asynchronously by nohz code from interrupt and context switch for each
> concerned subsystem with a set of function provided by these. Such
> functions are made of many conditions and details that can be heavyweight
> as they are called on fastpath: sched_can_stop_tick(),
> posix_cpu_timer_can_stop_tick(), perf_event_can_stop_tick()...
> 
> Thomas suggested a few month ago to make that tick dependency check
> synchronous. Instead of checking subsystems details from each interrupt
> to guess if the tick can be stopped, every subsystem that may have a tick
> dependency should set itself a flag specifying the state of that
> dependency. This way we can verify if we can stop the tick with a single
> lightweight mask check on fast path.
> 
> This conversion from a pull to a push model to implement tick dependency
> is the core feature of this patchset that is split into:
> 
> * Nohz wide kick simplification
> * Improve nohz tracing
> * Introduce tick dependency mask
> * Migrate scheduler, posix timers, perf events and sched clock tick
>   dependencies to the tick dependency mask.

Pulled into tip:timers/nohz, thanks a lot Frederic!

	Ingo

  reply	other threads:[~2016-03-08 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-04 17:00 [PATCH 0/9] nohz: Tick dependency mask v5 Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 1/9] atomic: Export fetch_or() Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 2/9] nohz: Implement wide kick on top of irq work Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 3/9] nohz: New tick dependency mask Frederic Weisbecker
2016-02-16  8:03   ` Ingo Molnar
2016-02-16 13:38     ` Frederic Weisbecker
2016-03-03  0:47     ` [GIT PULL] nohz: Tick dependency mask v2 Frederic Weisbecker
2016-03-08 13:14       ` Ingo Molnar [this message]
2016-02-04 17:00 ` [PATCH 4/9] nohz: Use enum code for tick stop failure tracing message Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 5/9] perf: Migrate perf to use new tick dependency mask model Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 6/9] sched: Account rr tasks Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 7/9] sched: Migrate sched to use new tick dependency mask model Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 8/9] posix-cpu-timers: Migrate " Frederic Weisbecker
2016-02-04 17:00 ` [PATCH 9/9] sched-clock: " Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160308131423.GA5646@gmail.com \
    --to=mingo@kernel.org \
    --cc=cl@linux.com \
    --cc=cmetcalf@ezchip.com \
    --cc=fweisbec@gmail.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.