Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Quagga: Dev

[PATCH 17/25] bgpd: optimize holdtime timer cancelling

 

 

Quagga dev RSS feed   Index | Next | Previous | View Threaded


jorge at dti2

May 7, 2012, 10:53 AM

Post #1 of 2 (229 views)
Permalink
[PATCH 17/25] bgpd: optimize holdtime timer cancelling

From: "Jorge Boncompte [DTI2]" <jorge [at] dti2>

* bgp_packet.c: (bgp_update_receive) for every update received we queue
an event just to cancel the holdtime timer, done in bgp_fsm_update().
Instead cancel the timer directly an avoid a scheduling pass.

This incidently fixes another problem found on a slow box, where thousands
of events threads were queued, and run, but never freed, because they are
moved to the unused list that grows without bounds.

Signed-off-by: Jorge Boncompte [DTI2] <jorge [at] dti2>
---
bgpd/bgp_packet.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index cfa0b57..024f5e7 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1854,8 +1854,8 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
peer->update_in++;
peer->update_time = bgp_clock ();

- /* Generate BGP event. */
- BGP_EVENT_ADD (peer, Receive_UPDATE_message);
+ /* Cancel holdtime timer */
+ BGP_TIMER_OFF (peer->t_holdtime);

return 0;
}
--
1.7.8.3


_______________________________________________
Quagga-dev mailing list
Quagga-dev [at] lists
http://lists.quagga.net/mailman/listinfo/quagga-dev


equinox at opensourcerouting

May 22, 2012, 11:35 AM

Post #2 of 2 (192 views)
Permalink
Re: [PATCH 17/25] bgpd: optimize holdtime timer cancelling [In reply to]

On Mon, May 07, 2012 at 07:53:07PM +0200, Jorge Boncompte [DTI2] wrote:
> From: "Jorge Boncompte [DTI2]" <jorge [at] dti2>
>
> * bgp_packet.c: (bgp_update_receive) for every update received we queue
> an event just to cancel the holdtime timer, done in bgp_fsm_update().
> Instead cancel the timer directly an avoid a scheduling pass.
>
> This incidently fixes another problem found on a slow box, where thousands
> of events threads were queued, and run, but never freed, because they are
> moved to the unused list that grows without bounds.

> - /* Generate BGP event. */
> - BGP_EVENT_ADD (peer, Receive_UPDATE_message);

Since with this, Receive_UPDATE_message is not triggered at all anymore,
does anyone have a good reason for not removing it altogether?


-David
Attachments: signature.asc (0.22 KB)

Quagga dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.