Messages in this thread | | | Date | Fri, 2 Sep 2011 11:19:25 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [PATCH 1/4] posix-timers: move global timer id management to signal_struct v2 |
| |
On Mon, 29 Aug 2011, Andi Kleen wrote:
Hint: Ccing maintainers of affected code might help to get code reviewed and eventually merged.
> diff --git a/include/linux/init_task.h b/include/linux/init_task.h > index d14e058..564248d 100644 > --- a/include/linux/init_task.h > +++ b/include/linux/init_task.h > @@ -10,6 +10,7 @@ > #include <linux/pid_namespace.h> > #include <linux/user_namespace.h> > #include <linux/securebits.h> > +#include <linux/idr.h>
New line please.
> #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.
> .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ > .rlim = INIT_RLIMITS, \ > .cputimer = { \ > @@ -46,6 +48,7 @@ extern struct fs_struct init_fs; > }, \ > .cred_guard_mutex = \ > __MUTEX_INITIALIZER(sig.cred_guard_mutex), \ > + .posix_timers_id = IDR_INIT(posix_timer_id), \
sig.posix_timer_id
> INIT_THREADGROUP_FORK_LOCK(sig) \ > }
> @@ -541,6 +539,7 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock, > int error, new_timer_id; > sigevent_t event; > int it_id_set = IT_ID_NOT_SET; > + struct signal_struct *s = current->signal;
*sig please, cryptic variable names are a PITA.
Thanks,
tglx
| |