On Thu, 17 Feb 2011, Nilay Vaish wrote:

On Wed, 16 Feb 2011, Beckmann, Brad wrote:

Hi Nilay,

I'm not quite sure what you mean by "appended to while you drain", but I think you are asking whether the input ports will receive messages that are scheduled for the same cycle as the current cycle. Is that right? If so, then you are correct, that should not happen.

As long as the input ports are evaluated in the current order of priority, you're change looks good to me. In the past, one could limit the loop iterations per cycle to approximate cache port contention. Therefore the higher priority ports must be listed first to avoid mandatory requests starving external responses.

Brad


I implemented it, for MOESI CMP directory protocol, I see about a 1% improvement in performance (when ruby random tester is profiled).

I think there is more room for improvement, especially since lot of the code is repeated again and again. I need to look more closely at code generation for trigger().

--
Nilay


Brad,

Messages queued up in an incoming link are processed in the following fashion --

while(true) {
  if(message exists) {
    peek(message);
    if(message type == some thing) {
      trigger(some thing);
    } else if (message type == some thing else) {
      trigger(some tthing else);
    } else {
      error();
    }
  }
  break;
}

Currently, with each trigger call, we generate the following code to process the result of the doTransition() function.

    if (result == TransitionResult_Valid) {
        counter++;
        continue; // Check the first port again
    }

    if (result == TransitionResult_ResourceStall) {
        g_eventQueue_ptr->scheduleEvent(this, 1);
    }


Suppose, we were to move all of this code after the else code block, would this affect, in any manner, the ability to express protocols? I think we should avoid generating same code with trigger again and again. Instead, this code will appear in each port. The new code may look some thing like this --

while(true) {
  if(message exists) {
    peek(message);
    if(message type == some thing) {
      trigger(some thing);
    } else if (message type == some thing else) {
      trigger(some tthing else);
    } else {
      error();
    }
    if (result == TransitionResult_Valid) {
        counter++;
        continue; // Check the first port again
    }
    if (result == TransitionResult_ResourceStall) {
        g_eventQueue_ptr->scheduleEvent(this, 1);
    }
  }
  break;
}

--
Nilay
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to