mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Venkatesh Pallipadi <venki@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, Paul Turner <pjt@google.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Shaun Ruffell <sruffell@digium.com>
Subject: Re: [PATCH 2/5] Add nsecs_to_cputime64 interface for asm-generic -v2
Date: Wed, 22 Dec 2010 16:25:46 +0100	[thread overview]
Message-ID: <20101222162546.05d1c9cd@mschwide.boeblingen.de.ibm.com> (raw)
In-Reply-To: <AANLkTi=Jensy79OAu10LWvmFC7kMHGUpeJUFRX-soGTw@mail.gmail.com>

On Wed, 22 Dec 2010 06:23:55 -0800
Venkatesh Pallipadi <venki@google.com> wrote:

> On Wed, Dec 22, 2010 at 12:30 AM, Martin Schwidefsky
> <schwidefsky@de.ibm.com> wrote:
> > On Tue, 21 Dec 2010 17:09:01 -0800
> > Venkatesh Pallipadi <venki@google.com> wrote:
> >
> >> Add nsecs_to_cputime64 interface. This is used in following patches that
> >> updates cpu irq stat based on ns granularity info in IRQ_TIME_ACCOUNTING.
> >>
> >> Tested-by: Shaun Ruffell <sruffell@digium.com>
> >> Signed-off-by: Venkatesh Pallipadi <venki@google.com>
> >> ---
> >>  include/asm-generic/cputime.h |    3 +++
> >>  include/linux/jiffies.h       |    1 +
> >>  kernel/time.c                 |   23 +++++++++++++++++++++--
> >>  3 files changed, 25 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h
> >> index 2bcc5c7..61e03dd 100644
> >> --- a/include/asm-generic/cputime.h
> >> +++ b/include/asm-generic/cputime.h
> >> @@ -30,6 +30,9 @@ typedef u64 cputime64_t;
> >>  #define cputime64_to_jiffies64(__ct) (__ct)
> >>  #define jiffies64_to_cputime64(__jif)        (__jif)
> >>  #define cputime_to_cputime64(__ct)   ((u64) __ct)
> >> +#define cputime64_gt(__a, __b)               ((__a) >  (__b))
> >> +
> >> +#define nsecs_to_cputime64(__ct)     nsecs_to_jiffies64(__ct)
> >>
> >>
> >>  /*
> >
> > If you define a new cputime primitive it is not enough to add it to the
> > generic cputime header. You have to add it to the arch-specific cputime
> > header for ia64, powerpc and s390 as well. Otherwise the build will
> > break with CONFIG_VIRT_CPU_ACCOUNTING=y on these architectures once the
> > new primitive is used.
> >
> 
> But, those archs have arch specific cputime as well and so need a
> different macro for nsecs_to_cputime64, instead of nsec_to_jiffies64.
> Right? As of now this new primitive should not be used in those archs.
> I guess this is something needed when using the primitive in future?

Yes on both parts of the question. You need an independent
implementation of the nsecs_to_cputime64 primitive for the architectures
that have their own definition of cputime and this definition will be
needed when the primitive is used is the future.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  reply	other threads:[~2010-12-22 15:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22  1:08 [PATCH 0/5] Proper kernel irq time reporting -v2 Venkatesh Pallipadi
2010-12-22  1:09 ` [PATCH 1/5] Free up pf flag PF_KSOFTIRQD -v2 Venkatesh Pallipadi
2010-12-22  9:17   ` Peter Zijlstra
2011-01-26 12:11   ` [tip:sched/core] softirqs: Free up pf flag PF_KSOFTIRQD tip-bot for Venkatesh Pallipadi
2010-12-22  1:09 ` [PATCH 2/5] Add nsecs_to_cputime64 interface for asm-generic -v2 Venkatesh Pallipadi
2010-12-22  8:30   ` Martin Schwidefsky
2010-12-22 14:23     ` Venkatesh Pallipadi
2010-12-22 15:25       ` Martin Schwidefsky [this message]
2011-01-26 12:12   ` [tip:sched/core] time: Add nsecs_to_cputime64 interface for asm-generic tip-bot for Venkatesh Pallipadi
2010-12-22  1:09 ` [PATCH 3/5] Refactor account_system_time separating id-update -v2 Venkatesh Pallipadi
2011-01-26 12:12   ` [tip:sched/core] sched: Refactor account_system_time separating id-update tip-bot for Venkatesh Pallipadi
2010-12-22  1:09 ` [PATCH 4/5] Export ns irqtimes through /proc/stat -v2 Venkatesh Pallipadi
2011-01-26 12:13   ` [tip:sched/core] sched: Export ns irqtimes through /proc/stat tip-bot for Venkatesh Pallipadi
2010-12-22  1:09 ` [PATCH 5/5] Account ksoftirqd time as cpustat softirq -v2 Venkatesh Pallipadi
2010-12-22  9:20   ` Peter Zijlstra
2010-12-22 13:59     ` Venkatesh Pallipadi
2010-12-22 14:05       ` Peter Zijlstra
2010-12-22 14:17         ` Venkatesh Pallipadi
2011-01-26 12:13   ` [tip:sched/core] softirqs: Account ksoftirqd time as cpustat softirq tip-bot for Venkatesh Pallipadi
2011-01-06 15:31 ` [PATCH 0/5] Proper kernel irq time reporting -v2 Shaun Ruffell

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=20101222162546.05d1c9cd@mschwide.boeblingen.de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=eric.dumazet@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=sruffell@digium.com \
    --cc=tglx@linutronix.de \
    --cc=venki@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®