On Fri, 8 Dec 2006 21:46:25 -0800 Andrew Morton wrote:
> On Fri, 8 Dec 2006 17:52:09 +0100
> Eric Dumazet <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]