netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Modica <modica@sgi.com>
To: netdev@oss.sgi.com
Subject: mod_timer improvement
Date: Thu, 02 Oct 2003 13:20:23 -0500	[thread overview]
Message-ID: <3F7C6C67.4010300@sgi.com> (raw)

Sorry about the screwed up formatting!  I'm kinda new at this :)



*** linux/linux/kernel/timer.c       2003/08/11 20:16:19     1.23
--- linux/linux/kernel/timer.c       2003/10/01 21:09:20     1.24
*************** int mod_timer(struct timer_list *timer,
*** 207,212 ****
--- 207,220 ----
         int ret;
         unsigned long flags;

+         /*
+        * This is a common optimization triggered by the
+        * networking code - if the timer is re-modified
+        * to be the same thing then just return:
+        */
+         if (timer->expires == expires && timer_pending(timer))
+                return 1;
+
         spin_lock_irqsave(&timerlist_lock, flags);
         timer->expires = expires;
         ret = detach_timer(timer);

-- 
Steve Modica
work: 651-683-3224
mobile: 651-261-3201
MTS-Technical Lead
"Give a man a fish, and he will eat for a day, hit him with a fish and
he leaves you alone" - me

             reply	other threads:[~2003-10-02 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-02 18:20 Steve Modica [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-02 16:54 mod_timer improvement Steve Modica
2003-10-02 17:15 ` Steve Modica
2003-10-03  6:40   ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F7C6C67.4010300@sgi.com \
    --to=modica@sgi.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).