All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Chris Metcalf <cmetcalf@ezchip.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Christoph Lameter <cl@linux.com>,
	"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
	Ingo Molnar <mingo@kernel.org>,
	stable@vger.kernel.org, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 6/7] cputime: Introduce vtime accounting check for readers
Date: Mon, 23 Nov 2015 16:22:11 +0100	[thread overview]
Message-ID: <20151123152210.GE3587@lerouge> (raw)
In-Reply-To: <20151123143516.GJ17308@twins.programming.kicks-ass.net>

On Mon, Nov 23, 2015 at 03:35:16PM +0100, Peter Zijlstra wrote:
> On Mon, Nov 23, 2015 at 03:19:19PM +0100, Frederic Weisbecker wrote:
> > On Thu, Nov 19, 2015 at 09:28:28PM +0100, Peter Zijlstra wrote:
> > > On Thu, Nov 19, 2015 at 04:47:33PM +0100, Frederic Weisbecker wrote:
> > > > +++ b/include/linux/vtime.h
> > > > @@ -17,9 +17,20 @@ static inline bool vtime_accounting_cpu_enabled(void) { return true; }
> > > >  #endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
> > > >  
> > > >  #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
> > > > +/*
> > > > + * Checks if vtime is enabled on some CPU. Cputime readers want to be careful
> > > > + * in that case and compute the tickless cputime.
> > > > + * For now vtime state is tied to context tracking. We might want to decouple
> > > > + * those later if necessary.
> > > > + */
> > > > +static inline bool vtime_accounting_enabled(void)
> > > > +{
> > > > +	return context_tracking_is_enabled();
> > > > +}
> > > 
> > > Should this not also include a definition of this function for
> > > CONFIG_VIRT_CPU_ACCOUNTING_NATIVE and CONFIG_VIRT_CPU_ACCOUNTING ?
> > 
> > I could but I haven't found any user of it yet for others than
> > CONFIG_VIRT_CPU_ACCOUNTING_GEN. The NATIVE version, when enabled, runs on
> > all CPUs anyway.
> 
> Aah, I see, task_gtime() etc.. have a different definition for !GEN.
> tricky.

Right, this whole CONFIG_VIRT_CPU_ACCOUNTING stuff is a bit messy. I tried
to consolidate as much code I could between NATIVE and GEN but the result
is hard to parse. I'll see if I can clean a few things up there.

To begin with, VIRT_CPU_ACCOUNTING is a horrible misnomer, as vtime.
VIRT suggests we are dealing with virtualization while it's absolutely
not the case. Perhaps something like BOUNDARY_CPU_ACCOUNTING would parse
better. Or TICKLESS_CPU_ACCOUNTING.

  reply	other threads:[~2015-11-23 15:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 15:47 [PATCH 0/7] cputime: A few tickless cputime accounting fixes and improvements Frederic Weisbecker
2015-11-19 15:47 ` [PATCH 1/7] cputime: Fix invalid gtime in proc Frederic Weisbecker
2015-12-04 11:53   ` [tip:locking/core] sched/cputime: " tip-bot for Hiroshi Shimamoto
2015-12-07 16:21     ` Frederic Weisbecker
2015-12-08  5:34       ` Ingo Molnar
2015-11-19 15:47 ` [PATCH 2/7] cputime: Remove extra cost in task_cputime Frederic Weisbecker
2015-12-04 11:55   ` [tip:sched/core] sched/cputime: Remove extra cost in task_cputime () tip-bot for Hiroshi Shimamoto
2015-11-19 15:47 ` [PATCH 3/7] cputime: Clarify vtime symbols and document them Frederic Weisbecker
2015-12-04 11:55   ` [tip:sched/core] sched/cputime: " tip-bot for Frederic Weisbecker
2015-11-19 15:47 ` [PATCH 4/7] cputime: Correctly handle task guest time on housekeepers Frederic Weisbecker
2015-12-04 11:55   ` [tip:sched/core] sched/cputime: " tip-bot for Frederic Weisbecker
2015-11-19 15:47 ` [PATCH 5/7] cputime: Rename vtime_accounting_enabled to vtime_accounting_cpu_enabled Frederic Weisbecker
2015-12-04 11:56   ` [tip:sched/core] sched/cputime: Rename vtime_accounting_enabled() to vtime_accounting_cpu_enabled() tip-bot for Frederic Weisbecker
2015-11-19 15:47 ` [PATCH 6/7] cputime: Introduce vtime accounting check for readers Frederic Weisbecker
2015-11-19 20:28   ` Peter Zijlstra
2015-11-23 14:19     ` Frederic Weisbecker
2015-11-23 14:35       ` Peter Zijlstra
2015-11-23 15:22         ` Frederic Weisbecker [this message]
2015-12-04 11:56   ` [tip:sched/core] sched/cputime: " tip-bot for Frederic Weisbecker
2015-11-19 15:47 ` [PATCH 7/7] cputime: Convert vtime_seqlock to seqcount Frederic Weisbecker
2015-12-04 11:56   ` [tip:sched/core] sched/cputime: " tip-bot for 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=20151123152210.GE3587@lerouge \
    --to=fweisbec@gmail.com \
    --cc=cl@linux.com \
    --cc=cmetcalf@ezchip.com \
    --cc=h-shimamoto@ct.jp.nec.com \
    --cc=lcapitulino@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.