[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0709240838250.23830@alien.or.mcafeemobile.com>
Date: Mon, 24 Sep 2007 08:42:47 -0700 (PDT)
From: Davide Libenzi <davidel@...ilserver.org>
To: Thomas Gleixner <tglx@...utronix.de>
cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Michael Kerrisk <mtk-manpages@....net>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [patch 1/3] new timerfd API - new timerfd API
On Mon, 24 Sep 2007, Thomas Gleixner wrote:
> > struct timerfd_ctx {
> > struct hrtimer tmr;
> > + int clockid;
> > ktime_t tintv;
> > wait_queue_head_t wqh;
> > int expired;
> > + u64 ticks;
> > };
>
> Can you please restructure the struct in a way which does not result in
> padding by the compiler ?
>
> struct timerfd_ctx {
> struct hrtimer tmr;
> ktime_t tintv;
> wait_queue_head_t wqh;
> u64 ticks;
> int expired;
> int clockid;
> };
Sure.
> > + ticks += (u64)
> > hrtimer_forward(&ctx->tmr,
> > hrtimer_cb_get_time(&ctx->tmr),
>
> You need to use ctx->tmr.base->get_time() here, otherwise you might read
> a stale time value (in case that CONFIG_HIGH_RES_TIMERS is off).
Is the particular position of hrtimer_cb_get_time() in the code that would
break here? Because function was added by your patch ;)
Did something change later?
> > +err_kfree_ctx:
> > + kfree(ctx);
> > + return error;
>
> You really can avoid the goto here.
Ack.
- Davide
-
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