Throttle.cc (9465:4ae4f3f4b870) | Throttle.cc (9499:b03b556a8fbb) |
---|---|
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; --- 34 unchanged lines hidden (view full) --- 43const int ADJUST_INTERVAL = 50000; 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 | 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; --- 34 unchanged lines hidden (view full) --- 43const int ADJUST_INTERVAL = 50000; 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, | 51Throttle::Throttle(int sID, NodeID node, Cycles link_latency, |
52 int link_bandwidth_multiplier, int endpoint_bandwidth, 53 ClockedObject *em) 54 : Consumer(em) 55{ 56 init(node, link_latency, link_bandwidth_multiplier, endpoint_bandwidth); 57 m_sID = sID; 58} 59 | 52 int link_bandwidth_multiplier, int endpoint_bandwidth, 53 ClockedObject *em) 54 : Consumer(em) 55{ 56 init(node, link_latency, link_bandwidth_multiplier, endpoint_bandwidth); 57 m_sID = sID; 58} 59 |
60Throttle::Throttle(NodeID node, int link_latency, | 60Throttle::Throttle(NodeID node, Cycles link_latency, |
61 int link_bandwidth_multiplier, int endpoint_bandwidth, 62 ClockedObject *em) 63 : Consumer(em) 64{ 65 init(node, link_latency, link_bandwidth_multiplier, endpoint_bandwidth); 66 m_sID = 0; 67} 68 69void | 61 int link_bandwidth_multiplier, int endpoint_bandwidth, 62 ClockedObject *em) 63 : Consumer(em) 64{ 65 init(node, link_latency, link_bandwidth_multiplier, endpoint_bandwidth); 66 m_sID = 0; 67} 68 69void |
70Throttle::init(NodeID node, int link_latency, int link_bandwidth_multiplier, 71 int endpoint_bandwidth) | 70Throttle::init(NodeID node, Cycles link_latency, 71 int link_bandwidth_multiplier, int endpoint_bandwidth) |
72{ 73 m_node = node; 74 m_vnets = 0; 75 76 assert(link_bandwidth_multiplier > 0); 77 m_link_bandwidth_multiplier = link_bandwidth_multiplier; 78 m_link_latency = link_latency; 79 m_endpoint_bandwidth = endpoint_bandwidth; --- 137 unchanged lines hidden (view full) --- 217 // available, so we must not have anything else to do until 218 // another message arrives. 219 DPRINTF(RubyNetwork, "%s not scheduled again\n", *this); 220 } else { 221 DPRINTF(RubyNetwork, "%s scheduled again\n", *this); 222 223 // We are out of bandwidth for this cycle, so wakeup next 224 // cycle and continue | 72{ 73 m_node = node; 74 m_vnets = 0; 75 76 assert(link_bandwidth_multiplier > 0); 77 m_link_bandwidth_multiplier = link_bandwidth_multiplier; 78 m_link_latency = link_latency; 79 m_endpoint_bandwidth = endpoint_bandwidth; --- 137 unchanged lines hidden (view full) --- 217 // available, so we must not have anything else to do until 218 // another message arrives. 219 DPRINTF(RubyNetwork, "%s not scheduled again\n", *this); 220 } else { 221 DPRINTF(RubyNetwork, "%s scheduled again\n", *this); 222 223 // We are out of bandwidth for this cycle, so wakeup next 224 // cycle and continue |
225 scheduleEvent(1); | 225 scheduleEvent(Cycles(1)); |
226 } 227} 228 229void 230Throttle::printStats(ostream& out) const 231{ 232 out << "utilized_percent: " << getUtilization() << endl; 233} --- 41 unchanged lines hidden --- | 226 } 227} 228 229void 230Throttle::printStats(ostream& out) const 231{ 232 out << "utilized_percent: " << getUtilization() << endl; 233} --- 41 unchanged lines hidden --- |