Actually we have this same change in our internal patch queue---and we
didn't coordinate with Nilay on this either (at least I don't think he got
it from us).  I thought we had posted it for review, but I guess not.

I think there are two arguments for using the ceiling instead of the floor:
1. In general we're dealing with latencies, and if you want to convert a
latency in ticks to a latency in cycles, that means waiting for the next
clock edge, not the previous clock edge or even the nearest clock edge.
2. Using anything other than ceiling means that non-zero tick delays can
get converted to zero cycle delays, which can have unforeseen consequences
when you're not expecting something that's not instantaneous to happen
instantaneously.  This is in fact the problem we were having that led us to
make this change internally.

Steve



On Tue, Nov 26, 2013 at 4:53 AM, Nilay Vaish <[email protected]> wrote:

> On Mon, 25 Nov 2013, Nilay Vaish wrote:
>
>  On Mon, 25 Nov 2013, Andreas Hansson wrote:
>>
>>  Hi Nilay,
>>>
>>> I¹m not 100% convinced I agree with this change. Isn¹t the floor just as
>>> right/wrong as the ceil?
>>>
>>
>> I don't think so. Here is a piece of code:
>>
>> src/mem/cache/cache_impl.hh:721:        lat +=
>> ticksToCycles(memSidePort->sendAtomic(bus_pkt));
>>
>> I think the author of that line would prefer ceil over floor.  And I
>> think for all the other 14 places where ticksToCycles() is in use, ceil is
>> preferable.
>>
>>
>>> More importantly, does this not change regressions?
>>>
>>>
>> Well, I have not tried running regressions.  I do expect them to change,
>> not by much though.
>>
>>
> I ran the regressions.  43 have changed statistics.  In terms of raw
> sim_ticks, 13 perform slightly better (-0.69% being the maximum change), 9
> perform slightly worse (+0.02% being the maximum change).  The rest have
> retained their sim_ticks value, but have changes to other variables.
>
> --
> Nilay
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
>
>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to