Re: [PATCH 1/4] posix-timers: move global timer id management tosignal_struct v2

From: Eric Dumazet
Date: Fri Sep 02 2011 - 06:05:24 EST


Le vendredi 02 septembre 2011 Ã 11:19 +0200, Thomas Gleixner a Ãcrit :
> On Mon, 29 Aug 2011, Andi Kleen wrote:
>
> Hint: Ccing maintainers of affected code might help to get code
> reviewed and eventually merged.

>
> > #include <net/net_namespace.h>
> >
> > #ifdef CONFIG_SMP
> > @@ -37,6 +38,7 @@ extern struct fs_struct init_fs;
> > .list = LIST_HEAD_INIT(sig.shared_pending.list), \
> > .signal = {{0}}}, \
> > .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
> > + .idr_lock = __SPIN_LOCK_UNLOCKED(idr_lock), \
>
> sig.idr_lock
>
> Also is there a requirement, that this is a spinlock? AFAICT it's all
> process context and slowpath, so we can make it a mutex.

If so, please Andi remove the idr_pre_get() call : This would be
useless, since we are allowed to sleep under mutex.

This would lower the memory needs of a per-process idr pre-initted with
IDR_FREE_MAX items in free list. This was OK for a system wide
posix_timers_id.



--
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/