On 17.02.16 18:44, Mike Holmes wrote:
Does this tuning need to be documented in the implementer's guide ?
I thinks, no.


On 17 February 2016 at 10:51, Zoltan Kiss <zoltan.k...@linaro.org 
<mailto:zoltan.k...@linaro.org>> wrote:



    On 17/02/16 15:24, Ivan Khoronzhuk wrote:

        Hi, Zoltan

        On 17.02.16 17:12, Zoltan Kiss wrote:

            Hi Ivan,

            I haven an another issue related to time API, which is related to 
your
            recent patches, particularly this code:

            wait_time = odp_schedule_wait_time(ODP_TIME_SEC_IN_NS);
            ...
            /* check time correctness */
            start_time = odp_time_local();
            for (i = 1; i < 6; i++) {
                  odp_schedule(&queue, wait_time);
                  printf("%d..", i);
            }
            end_time = odp_time_local();

            diff = odp_time_diff(end_time, start_time);
            ...
            upper_limit = odp_time_local_from_ns(5 * ODP_TIME_SEC_IN_NS +
            ODP_WAIT_TOLERANCE);

            ...
            CU_ASSERT(odp_time_cmp(diff, upper_limit) <= 0);

            This assert fails every now and then on ODP-DPDK, because although
            wait_time is 1 sec, and you call odp_schedule() 5 times, you can't
            really have any guarantees how long the delay lasts between the
            subsequent calls, or how long the printf lasts (or the function call
            overhead). I think we should come up with something more accurate
            which doesn't produce false positives like this.

            Regards,

            Zoltan


        That's why I'm used WAIT_TOLERANCE in 20ms. That is about 2 context
        switches.
        I've tested it on Keystone and on linux-generic. It was enough.
        If you are testing it on system with more load it's probably not enough.
        Time spent on printf and schedule calls is not comparable with such time
        tolerance.
        Did you try to figure out the real delay it takes with DPDK?


    Nope, it happens quite rarely in CI, and we don't have too much information 
about the reasons. I assume it is a momentary higher load on the system.

        Maybe we should increase it to be 3 or even 4 context switches.
        Say 40ms, in order to be not so sensitive for some systems.
        #define ODP_WAIT_TOLERANCE    (40 * ODP_TIME_MSEC_IN_NS)


    Yes, that might help.



    _______________________________________________
    lng-odp mailing list
    lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
    https://lists.linaro.org/mailman/listinfo/lng-odp




--
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
"Work should be fun and collborative, the rest follows"

__



--
Regards,
Ivan Khoronzhuk
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to