[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061208220750.b953d414.randy.dunlap@oracle.com>
Date: Fri, 8 Dec 2006 22:07:50 -0800
From: Randy Dunlap <randy.dunlap@...cle.com>
To: Andrew Morton <akpm@...l.org>
Cc: Eric Dumazet <dada1@...mosbay.com>, Andi Kleen <ak@...e.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] group xtime, xtime_lock, wall_to_monotonic, avenrun,
calc_load_count fields together in ktimed
On Fri, 8 Dec 2006 21:46:25 -0800 Andrew Morton wrote:
> On Fri, 8 Dec 2006 17:52:09 +0100
> Eric Dumazet <dada1@...mosbay.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists