Throttle.cc (8232:b28d06a175be) Throttle.cc (8259:36987780169e)
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 35 unchanged lines hidden (view full) ---

44const int MESSAGE_SIZE_MULTIPLIER = 1000;
45//const int BROADCAST_SCALING = 4; // Have a 16p system act like a 64p systems
46const int BROADCAST_SCALING = 1;
47const int PRIORITY_SWITCH_LIMIT = 128;
48
49static int network_message_to_size(NetworkMessage* net_msg_ptr);
50
51Throttle::Throttle(int sID, NodeID node, int link_latency,
1/*
2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 35 unchanged lines hidden (view full) ---

44const int MESSAGE_SIZE_MULTIPLIER = 1000;
45//const int BROADCAST_SCALING = 4; // Have a 16p system act like a 64p systems
46const int BROADCAST_SCALING = 1;
47const int PRIORITY_SWITCH_LIMIT = 128;
48
49static int network_message_to_size(NetworkMessage* net_msg_ptr);
50
51Throttle::Throttle(int sID, NodeID node, int link_latency,
52 int link_bandwidth_multiplier)
52 int link_bandwidth_multiplier, int endpoint_bandwidth)
53{
53{
54 init(node, link_latency, link_bandwidth_multiplier);
54 init(node, link_latency, link_bandwidth_multiplier, endpoint_bandwidth);
55 m_sID = sID;
56}
57
58Throttle::Throttle(NodeID node, int link_latency,
55 m_sID = sID;
56}
57
58Throttle::Throttle(NodeID node, int link_latency,
59 int link_bandwidth_multiplier)
59 int link_bandwidth_multiplier, int endpoint_bandwidth)
60{
60{
61 init(node, link_latency, link_bandwidth_multiplier);
61 init(node, link_latency, link_bandwidth_multiplier, endpoint_bandwidth);
62 m_sID = 0;
63}
64
65void
62 m_sID = 0;
63}
64
65void
66Throttle::init(NodeID node, int link_latency, int link_bandwidth_multiplier)
66Throttle::init(NodeID node, int link_latency, int link_bandwidth_multiplier,
67 int endpoint_bandwidth)
67{
68 m_node = node;
69 m_vnets = 0;
70
71 assert(link_bandwidth_multiplier > 0);
72 m_link_bandwidth_multiplier = link_bandwidth_multiplier;
73 m_link_latency = link_latency;
68{
69 m_node = node;
70 m_vnets = 0;
71
72 assert(link_bandwidth_multiplier > 0);
73 m_link_bandwidth_multiplier = link_bandwidth_multiplier;
74 m_link_latency = link_latency;
75 m_endpoint_bandwidth = endpoint_bandwidth;
74
75 m_wakeups_wo_switch = 0;
76 clearStats();
77}
78
79void
80Throttle::clear()
81{

--- 190 unchanged lines hidden ---
76
77 m_wakeups_wo_switch = 0;
78 clearStats();
79}
80
81void
82Throttle::clear()
83{

--- 190 unchanged lines hidden ---