From: Randy Dunlap <randy.dunlap@oracle.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Eric Dumazet <dada1@cosmosbay.com>, Andi Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] group xtime, xtime_lock, wall_to_monotonic, avenrun, calc_load_count fields together in ktimed
Date: Fri, 8 Dec 2006 22:07:50 -0800 [thread overview]
Message-ID: <20061208220750.b953d414.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20061208214625.90e010ae.akpm@osdl.org>
On Fri, 8 Dec 2006 21:46:25 -0800 Andrew Morton wrote:
> On Fri, 8 Dec 2006 17:52:09 +0100
> Eric Dumazet <dada1@cosmosbay.com> wrote:
[snip]
> Sounds like you have about three patches there.
>
> <save attachment, read from file, s/^/> />
>
> >
> > -extern struct timespec xtime;
> > -extern struct timespec wall_to_monotonic;
> > -extern seqlock_t xtime_lock;
> > +/*
> > + * define a structure to keep all fields close to each others.
> > + */
> > +struct ktimed_struct {
> > + struct timespec _xtime;
> > + struct timespec wall_to_monotonic;
> > + seqlock_t lock;
> > + unsigned long avenrun[3];
> > + int calc_load_count;
> > +};
>
> crappy name, but I guess it doesn't matter as nobody will use it at this
> stage. But...
ktimedata would be better IMO. somethingd looks like a daemon.
>
> > +extern struct ktimed_struct ktimed;
> > +#define xtime ktimed._xtime
> > +#define wall_to_monotonic ktimed.wall_to_monotonic
> > +#define xtime_lock ktimed.lock
> > +#define avenrun ktimed.avenrun
>
> They'll use these instead.
>
> Frankly, I think we'd be better off removing these macros and, longer-term,
> use
>
> write_seqlock(time_data.xtime_lock);
>
> The approach you have here would be a good transition-period thing.
[snip]
> hm, the patch seems to transform a mess into a mess. I guess it's a messy
> problem.
>
> I agree that aggregating all the time-related things into a struct like
> this makes some sense. As does aggregating them all into a similar-looking
> namespace, but that'd probably be too intrusive - too late for that.
Just curious, is the change measurable (time/performance wise)?
Patch makes sense anyway.
---
~Randy
next prev parent reply other threads:[~2006-12-09 6:07 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-03 5:50 [PATCH] Export current_is_keventd() for libphy Ben Collins
2006-12-03 9:16 ` Andrew Morton
2006-12-04 19:17 ` Steve Fox
2006-12-05 18:05 ` Maciej W. Rozycki
2006-12-05 17:48 ` Maciej W. Rozycki
2006-12-05 18:07 ` Linus Torvalds
2006-12-05 19:31 ` Andrew Morton
2006-12-05 18:57 ` Andy Fleming
2006-12-06 12:31 ` Maciej W. Rozycki
2006-12-05 20:39 ` Andrew Morton
2006-12-05 20:59 ` Andy Fleming
2006-12-05 21:26 ` Andrew Morton
2006-12-05 21:37 ` Roland Dreier
2006-12-05 21:57 ` Andrew Morton
2006-12-05 23:49 ` Roland Dreier
2006-12-05 23:52 ` Roland Dreier
2006-12-06 15:25 ` Maciej W. Rozycki
2006-12-06 15:57 ` Andrew Morton
2006-12-06 17:17 ` Linus Torvalds
2006-12-07 1:21 ` Linus Torvalds
2006-12-07 6:42 ` Andrew Morton
2006-12-07 7:49 ` Andrew Morton
2006-12-07 10:29 ` David Howells
2006-12-07 10:42 ` Andrew Morton
2006-12-07 17:05 ` Jeff Garzik
2006-12-07 17:57 ` Andrew Morton
2006-12-07 18:17 ` Andrew Morton
2006-12-08 16:52 ` [PATCH] group xtime, xtime_lock, wall_to_monotonic, avenrun, calc_load_count fields together in ktimed Eric Dumazet
2006-12-09 5:46 ` Andrew Morton
2006-12-09 6:07 ` Randy Dunlap [this message]
2006-12-11 20:44 ` Eric Dumazet
2006-12-11 22:00 ` Andrew Morton
2006-12-13 21:26 ` [PATCH] Introduce time_data, a new structure to hold jiffies, xtime, xtime_lock, wall_to_monotonic, calc_load_count and avenrun Eric Dumazet
2006-12-15 5:24 ` Andrew Morton
2006-12-15 11:21 ` Eric Dumazet
2006-12-15 16:21 ` Eric Dumazet
2006-12-07 18:08 ` [PATCH] Export current_is_keventd() for libphy Maciej W. Rozycki
2006-12-07 18:59 ` Andy Fleming
2006-12-07 16:49 ` Linus Torvalds
2006-12-07 17:52 ` Andrew Morton
2006-12-07 18:01 ` Linus Torvalds
2006-12-07 18:16 ` Andrew Morton
2006-12-07 18:27 ` Linus Torvalds
2006-12-07 15:28 ` Maciej W. Rozycki
2006-12-06 17:43 ` David Howells
2006-12-06 17:50 ` Jeff Garzik
2006-12-06 18:07 ` Linus Torvalds
2006-12-06 17:53 ` Linus Torvalds
2006-12-06 17:58 ` Linus Torvalds
2006-12-06 18:33 ` Linus Torvalds
2006-12-06 18:37 ` Linus Torvalds
2006-12-06 18:43 ` David Howells
2006-12-06 19:02 ` Linus Torvalds
2006-12-06 18:02 ` David Howells
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=20061208220750.b953d414.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.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 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®