Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > > > +void fastcall init_timer(struct timer_list *timer) > > +{ > > + timer->entry.next = NULL; > > + timer->_base = _cpu(tvec_bases, > > + __smp_processor_id()).t_base; > > +

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Oleg Nesterov
Andrew Morton wrote: > > Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > > > +void fastcall init_timer(struct timer_list *timer) > > +{ > > +timer->entry.next = NULL; > > +timer->_base = _cpu(tvec_bases, > > +__smp_processor_id()).t_base; > > +timer->magic =

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Andrew Morton
Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > +void fastcall init_timer(struct timer_list *timer) > +{ > +timer->entry.next = NULL; > +timer->_base = _cpu(tvec_bases, > +__smp_processor_id()).t_base; > +timer->magic = TIMER_MAGIC; > +} __smp_processor_id() is

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Oleg Nesterov
Oh, It never ends. Andrew, please apply this too. Or I can send you updated previous patch if your prefer. [PATCH] timers fixes/improvements fix 1. Fix compilation with CONFIG_NO_IDLE_HZ: s/->lock/->t_base.lock/ 2. s/_base/base as Ingo suggested. Signed-off-by: Oleg Nesterov <[EMAIL

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Oleg Nesterov
Oh, It never ends. Andrew, please apply this too. Or I can send you updated previous patch if your prefer. [PATCH] timers fixes/improvements fix 1. Fix compilation with CONFIG_NO_IDLE_HZ: s/-lock/-t_base.lock/ 2. s/_base/base as Ingo suggested. Signed-off-by: Oleg Nesterov [EMAIL PROTECTED]

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Andrew Morton
Oleg Nesterov [EMAIL PROTECTED] wrote: +void fastcall init_timer(struct timer_list *timer) +{ +timer-entry.next = NULL; +timer-_base = per_cpu(tvec_bases, +__smp_processor_id()).t_base; +timer-magic = TIMER_MAGIC; +} __smp_processor_id() is not

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Oleg Nesterov
Andrew Morton wrote: Oleg Nesterov [EMAIL PROTECTED] wrote: +void fastcall init_timer(struct timer_list *timer) +{ +timer-entry.next = NULL; +timer-_base = per_cpu(tvec_bases, +__smp_processor_id()).t_base; +timer-magic = TIMER_MAGIC; +}

Re: [RFC][PATCH] timers fixes/improvements

2005-04-02 Thread Ingo Molnar
* Andrew Morton [EMAIL PROTECTED] wrote: Oleg Nesterov [EMAIL PROTECTED] wrote: +void fastcall init_timer(struct timer_list *timer) +{ + timer-entry.next = NULL; + timer-_base = per_cpu(tvec_bases, + __smp_processor_id()).t_base; + timer-magic =

RE: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Chen, Kenneth W
Linus Torvalds <[EMAIL PROTECTED]> wrote: > On Fri, 1 Apr 2005, Oleg Nesterov wrote: > > > > This patch replaces and updates 6 timer patches which are currently > > in -mm tree. This version does not play games with __TIMER_PENDING > > bit, so incremental patch is not suitable. It is against

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Christoph Lameter
On Fri, 1 Apr 2005, Andrew Morton wrote: > Sure. Christoph and (I think) Ken have been seeing mysterious misbehaviour > which _might_ be due to Oleg's first round of timer patches. I assume C > will test this new patch? Yes will be tested. The hangs disappeared here when we removed Oleg's

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Andrew Morton
Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > > On Fri, 1 Apr 2005, Oleg Nesterov wrote: > > > > This patch replaces and updates 6 timer patches which are currently > > in -mm tree. This version does not play games with __TIMER_PENDING > > bit, so incremental patch is not suitable. It is

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Linus Torvalds
On Fri, 1 Apr 2005, Oleg Nesterov wrote: > > This patch replaces and updates 6 timer patches which are currently > in -mm tree. This version does not play games with __TIMER_PENDING > bit, so incremental patch is not suitable. It is against 2.6.12-rc1. > Please comment. I am sending pseudo code

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Oleg Nesterov
Ingo Molnar wrote: > > * Oleg Nesterov <[EMAIL PROTECTED]> wrote: > > > struct timer_list { > > ... > > timer_base_t *_base; > > }; > > namespace cleanliness: i'd suggest s/_base/base. I deliberately renamed it to '_base' because then it is much more grepable. But I don't mind doing

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Ingo Molnar
* Oleg Nesterov <[EMAIL PROTECTED]> wrote: > struct timer_list { > ... > timer_base_t *_base; > }; namespace cleanliness: i'd suggest s/_base/base. another detail: > int __mod_timer(struct timer_list *timer, unsigned long expires) [...] > /* Ensure the timer is

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Ingo Molnar
* Oleg Nesterov <[EMAIL PROTECTED]> wrote: > This patch replaces and updates 6 timer patches which are currently in > -mm tree. This version does not play games with __TIMER_PENDING bit, > so incremental patch is not suitable. It is against 2.6.12-rc1. Please > comment. I am sending pseudo

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Oleg Nesterov
Here it is code snippets for easier review. typedef struct timer_base_s { spinlock_t lock; struct timer_list *running_timer; } timer_base_t; struct tvec_t_base_s { timer_base_t t_base; ... } tvec_bases[]; struct timer_list { ... timer_base_t

[RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Oleg Nesterov
This patch replaces and updates 6 timer patches which are currently in -mm tree. This version does not play games with __TIMER_PENDING bit, so incremental patch is not suitable. It is against 2.6.12-rc1. Please comment. I am sending pseudo code in a separate message for easier review. This patch

[RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Oleg Nesterov
This patch replaces and updates 6 timer patches which are currently in -mm tree. This version does not play games with __TIMER_PENDING bit, so incremental patch is not suitable. It is against 2.6.12-rc1. Please comment. I am sending pseudo code in a separate message for easier review. This patch

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Oleg Nesterov
Here it is code snippets for easier review. typedef struct timer_base_s { spinlock_t lock; struct timer_list *running_timer; } timer_base_t; struct tvec_t_base_s { timer_base_t t_base; ... } tvec_bases[]; struct timer_list { ... timer_base_t

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Ingo Molnar
* Oleg Nesterov [EMAIL PROTECTED] wrote: This patch replaces and updates 6 timer patches which are currently in -mm tree. This version does not play games with __TIMER_PENDING bit, so incremental patch is not suitable. It is against 2.6.12-rc1. Please comment. I am sending pseudo code in

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Ingo Molnar
* Oleg Nesterov [EMAIL PROTECTED] wrote: struct timer_list { ... timer_base_t *_base; }; namespace cleanliness: i'd suggest s/_base/base. another detail: int __mod_timer(struct timer_list *timer, unsigned long expires) [...] /* Ensure the timer is serialized.

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Oleg Nesterov
Ingo Molnar wrote: * Oleg Nesterov [EMAIL PROTECTED] wrote: struct timer_list { ... timer_base_t *_base; }; namespace cleanliness: i'd suggest s/_base/base. I deliberately renamed it to '_base' because then it is much more grepable. But I don't mind doing s/_base/base/ if you

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Linus Torvalds
On Fri, 1 Apr 2005, Oleg Nesterov wrote: This patch replaces and updates 6 timer patches which are currently in -mm tree. This version does not play games with __TIMER_PENDING bit, so incremental patch is not suitable. It is against 2.6.12-rc1. Please comment. I am sending pseudo code in a

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Andrew Morton
Linus Torvalds [EMAIL PROTECTED] wrote: On Fri, 1 Apr 2005, Oleg Nesterov wrote: This patch replaces and updates 6 timer patches which are currently in -mm tree. This version does not play games with __TIMER_PENDING bit, so incremental patch is not suitable. It is against 2.6.12-rc1.

Re: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Christoph Lameter
On Fri, 1 Apr 2005, Andrew Morton wrote: Sure. Christoph and (I think) Ken have been seeing mysterious misbehaviour which _might_ be due to Oleg's first round of timer patches. I assume CK will test this new patch? Yes will be tested. The hangs disappeared here when we removed Oleg's

RE: [RFC][PATCH] timers fixes/improvements

2005-04-01 Thread Chen, Kenneth W
Linus Torvalds [EMAIL PROTECTED] wrote: On Fri, 1 Apr 2005, Oleg Nesterov wrote: This patch replaces and updates 6 timer patches which are currently in -mm tree. This version does not play games with __TIMER_PENDING bit, so incremental patch is not suitable. It is against 2.6.12-rc1.