[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221028164910.6804a855@gandalf.local.home>
Date: Fri, 28 Oct 2022 16:49:10 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Trond Myklebust <trondmy@...merspace.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Stephen Boyd <sboyd@...nel.org>,
Guenter Roeck <linux@...ck-us.net>,
Anna Schumaker <anna@...nel.org>,
"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>
Subject: Re: [RFC][PATCH v2 00/31] timers: Use del_timer_shutdown() before
freeing timers
On Fri, 28 Oct 2022 20:12:30 +0000
Trond Myklebust <trondmy@...merspace.com> wrote:
> I seem to vaguely remember that at the time, del_timer_sync() would loop
> in order to catch re-arming timers, whereas del_singleshot_timer_sync()
> would not, hence the commit message. The expectation for
> del_singleshot_timer_sync() was simply that the caller would ensure
> safety against re-arming, which was indeed the case for this code.
Well, that expectation didn't last long. Your commit was added on June 22,
2005. Then on June 23, 2005 (the next day!) this happened:
55c888d6d09a0 ("timers fixes/improvements")
Which has:
@@ -89,12 +77,12 @@ static inline void add_timer(struct timer_list * timer)
#ifdef CONFIG_SMP
extern int del_timer_sync(struct timer_list *timer);
- extern int del_singleshot_timer_sync(struct timer_list *timer);
#else
# define del_timer_sync(t) del_timer(t)
-# define del_singleshot_timer_sync(t) del_timer(t)
#endif
+#define del_singleshot_timer_sync(t) del_timer_sync(t)
+
So much or efficiency! :-)
I guess converting it back to del_timer_sync() is the right thing to do
regardless of this patch series. I'll send you a patch.
-- Steve
Powered by blists - more mailing lists