From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
john stultz <johnstul@us.ibm.com>
Subject: Re: [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y
Date: Mon, 6 Jul 2009 16:15:35 +0200 [thread overview]
Message-ID: <20090706161535.4a36b4cb@skybase> (raw)
In-Reply-To: <4A52051A.60407@gmail.com>
On Mon, 06 Jul 2009 16:07:22 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > diff -urpN linux-2.5/kernel/time/timekeeping.c linux-2.5-patched/kernel/time/timekeeping.c
> > --- linux-2.5/kernel/time/timekeeping.c 2009-07-03 10:46:07.000000000 +0200
> > +++ linux-2.5-patched/kernel/time/timekeeping.c 2009-07-03 10:46:23.000000000 +0200
> > @@ -118,6 +118,69 @@ void getnstimeofday(struct timespec *ts)
> >
> > EXPORT_SYMBOL(getnstimeofday);
> >
> > +ktime_t ktime_get(void)
> > +{
> > + cycle_t cycle_now, cycle_delta;
> > + struct timespec time;
> > + unsigned long seq;
> > + s64 nsecs;
> > +
> > + do {
> > + seq = read_seqbegin(&xtime_lock);
>
> minor nit : read_seqbegin() returns an "unsigned int", not an "unsigned long"
Hmm, just cut-copy-pasted the seq-loop. Seems like a job for the janitor ..
But I will update my patch.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
next prev parent reply other threads:[~2009-07-06 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 13:49 [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y Martin Schwidefsky
2009-07-06 14:07 ` Eric Dumazet
2009-07-06 14:15 ` Martin Schwidefsky [this message]
2009-07-06 18:41 ` john stultz
2009-07-06 20:31 ` Thomas Gleixner
2009-07-07 7:40 ` Martin Schwidefsky
2009-07-07 8:08 ` Thomas Gleixner
2009-07-07 9:27 ` Martin Schwidefsky
2009-07-07 12:06 ` [tip:timers/core] timekeeping: " tip-bot for Martin Schwidefsky
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=20090706161535.4a36b4cb@skybase \
--to=schwidefsky@de.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox