Re: [PATCH v2] posix-timers: RCU conversion

From: Oleg Nesterov
Date: Tue Apr 05 2011 - 11:44:43 EST


On 04/05, Eric Dumazet wrote:
>
> Le mardi 05 avril 2011 à 16:48 +0200, Oleg Nesterov a écrit :
> >
> > Not that I really think it makes sense to change the patch... but we
> > could even use SLAB_DESTROY_BY_RCU, this is more effective. All we
> > need is ctor which sets ->it_signal = NULL and initializes ->it_lock
> > for lock_timer().
> >
>
> I considered this, but this means SLUB cannot merge the
> posix_timers_cache anymore.

OK, I see.

> > The question is, why do we use the global database for the timer ids.
> > All timers live in signal_struct->posix_timers anyway, perhaps we could
> > use a per-process array instead.
> >
>
> This would add some overhead at process creation (to initialize the
> 'array' or whatever tree root).

I am not sure. This initialization should be as simple as
"p->timers_array = NULL".

But,

> It would help some workloads, (create/delete timers from lot of
> different processes/cpus). I am not sure we really need this right now,
> since we waited 2011 before even trying to optimize read side ;)

Yes, agreed.

So, I think the patch is fine.

Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/