lkml.org 
[lkml]   [2006]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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@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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-12-09 07:09    [W:0.030 / U:0.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site