[Spread-users] main concern on High CPU utilization
Sandeep Jeevan
sandeep.jeevan at vnl.in
Mon Apr 6 11:22:54 EDT 2009
Hi Everybody
Can anybody let me how this for loop is decided as I had noticed that when the loops works for 8 times then the CPU remains constant but when it start to go for 15 times then it is taking CPU around 60%.Please let me know how to minimum the loop to work exactly 7 or 8 times. what exactly is the deciding factor form this loop.
Thanks in advance .Please reply as soon as possible.
static void Deliver_agreed_packets()
{
/* deliver all non-safe packets that are ordered and not delivered */
int pack_entry;
int i;
if( My_aru <= Last_delivered ) return;
if( Memb_state() == EVS ) return;
for( i = Last_delivered+1; i <= My_aru; i++ )
{
pack_entry = i & PACKET_MASK;
if( Packets[pack_entry].exist == 1 )
{
if( !Is_safe( Packets[pack_entry].head->type ) )
{
Deliver_packet( pack_entry, 1 );
Alarm( PROTOCOL, "Deliver_agreed_packets: packet %d was delivered\n", i );
Last_delivered++;
}else return;
}else if( Packets[pack_entry].exist == 2 ){
/* This is possible only for reliable delivery prior to agreed */
Last_delivered++;
}else Alarm( EXIT, "Deliver_agreed_packets: Error, exist is %d\n", Packets[pack_entry].exist );
}
}
Sandeep jeevan
Member Technical(Stack)
Mob:9717892153
VNL | 246, Phase IV, Udyog Vihar, Gurgaon, Haryana 122 015, INDIA | +91-124-4311600-609 | F +91-124-4104766 | www.vnl.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.spread.org/pipermail/spread-users/attachments/20090406/c53e1441/attachment.html
More information about the Spread-users
mailing list