[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1109062146150.2723@ionos>
Date: Tue, 6 Sep 2011 22:10:02 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: Oleg Nesterov <oleg@...hat.com>, Andi Kleen <ak@...ux.intel.com>,
Andi Kleen <andi@...stfloor.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/4] posix-timers: turn it_signal into it_valid flag
On Tue, 6 Sep 2011, Eric Dumazet wrote:
> Le mardi 06 septembre 2011 à 21:16 +0200, Thomas Gleixner a écrit :
> > On Tue, 6 Sep 2011, Oleg Nesterov wrote:
> > Right, but we can solve this by moving the whole detach code into rcu.
> >
>
> Why ? Is the dequeue thing guaranteed in the rcu grace period ?
No, as Oleg pointed out we need an rcu_read_lock() in dequeue_signal()
> ALso, delaying the idr_remove() probably makes next Andi patch more
> complex (move global timer id management to signal_struct)
>
> struct k_itimer will need a backpointer to signal_struct, and an
> additional refcount on it.
Well, first of all we need that problem at hand to be fixed.
And the backpointer is not rocket science at all.
--- linux-2.6.orig/include/linux/posix-timers.h
+++ linux-2.6/include/linux/posix-timers.h
@@ -82,7 +82,10 @@ struct k_itimer {
unsigned long expires;
} mmtimer;
struct alarm alarmtimer;
- struct rcu_head rcu;
+ struct {
+ struct rcu_head rcu;
+ struct signal_struct *it_signal;
+ } rcu;
} it;
};
Solves that nicely and we still can get rid of the original *it_signal
and rely on the list_head.
Vs. the refcounting, that should be solvable by a rcu_barrier() before
+ idr_destroy(&sig->posix_timers_id);
in exit_itimers().
Thanks,
tglx
Powered by blists - more mailing lists