netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jun Zhao <mypopydev@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2] ipv4 : igmp : optimize timer modify logic in igmp_mod_timer()
Date: Thu, 24 Nov 2011 06:54:45 +0800	[thread overview]
Message-ID: <1322088885.5402.17.camel@barry.pixelworks.com> (raw)
In-Reply-To: <20111123.172814.1626722266908002386.davem@davemloft.net>

On Wed, 2011-11-23 at 17:28 -0500, David Miller wrote:
> From: Jun Zhao <mypopydev@gmail.com>
> Date: Thu, 24 Nov 2011 00:38:42 +0800
> 
> > When timer is pending and expires less-than-or-equal-to new delay,
> > we need not used del_timer()/add_timer().
> > 
> > Signed-off-by: Jun Zhao <mypopydev@gmail.com>
> 
> You did not answer Eric's question, why are you optimizing this
> less-used code path?

1). Oh, in the RFC 3376 $5.2, Page 23:

"
   4. If there already is a pending response to a previous Query
      scheduled for this group, and either the new Query is a Group-
      Specific Query or the recorded source-list associated with the
      group is empty, then the group source-list is cleared and a single
      response is scheduled using the group timer.  The new response is
      scheduled to be sent at the earliest of the remaining time for the
      pending report and the selected delay.

   5. If the received Query is a Group-and-Source-Specific Query and
      there is a pending response for this group with a non-empty
      source-list, then the group source list is augmented to contain
      the list of sources in the new Query and a single response is
      scheduled using the group timer.  The new response is scheduled to
      be sent at the earliest of the remaining time for the pending
      report and the selected delay.
"
I think this patch more conform to the RFC.

2). Maybe this is a less-used code path, but we can do better than
current.

3). In the current implementation, "im->tm_running = 1;" is redundant 

  reply	other threads:[~2011-11-23 22:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 16:38 [PATCH v2] ipv4 : igmp : optimize timer modify logic in igmp_mod_timer() Jun Zhao
2011-11-23 22:28 ` David Miller
2011-11-23 22:54   ` Jun Zhao [this message]
2011-11-24  0:04     ` David Miller
2011-11-24  1:27       ` Jun Zhao

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=1322088885.5402.17.camel@barry.pixelworks.com \
    --to=mypopydev@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).