/** * Schedule one buffer * * Like odp_schedule(), but is quaranteed to schedule only one buffer at a time. * Each call will perform global scheduling and will reserve one buffer per * thread in maximum. When called after other schedule functions, returns * locally stored buffers (if any) first, and then continues in the global * scheduling mode. * * This function optimises priority scheduling (over throughput). * * User can exit the schedule loop without first calling odp_schedule_pause(). * * @param from Output parameter for the source queue (where the buffer was * dequeued from). Ignored if NULL. * @param wait Minimum time to wait for a buffer. Waits infinitely, if set to * ODP_SCHED_WAIT. Does not wait, if set to ODP_SCHED_NO_WAIT. * Use odp_schedule_wait_time() to convert time to other wait * values. * * @return Next highest priority buffer, or ODP_BUFFER_INVALID */ odp_buffer_t odp_schedule_one(odp_queue_t *from, uint64_t wait);
As it says in the documentation, this schedule call will not maximize throughput, but - let user to step out from the scheduling loop easily (e.g. between every schedule call) - optimizes for QoS (by forcing global scheduling on each call) -Petri From: [email protected] [mailto:[email protected]] On Behalf Of ext Alexandru Badicioiu Sent: Friday, October 10, 2014 3:58 PM To: [email protected] Subject: [lng-odp] odp_example scheduling tests behavior Hi, I'm looking into test_schedule_one_single() test case and I noticed that fair behavior of the scheduler is required for this test to pass - a core must receive from the scheduler exactly the same number of the frames it sent to the queue. Also an PULL model is assumed here. if (create_queue(thr, msg_pool, prio)) ----> enqueues one buffer return -1; t1 = odp_time_get_cycles(); for (i = 0; i < QUEUE_ROUNDS; i++) { buf = odp_schedule_one(&queue, ODP_SCHED_WAIT); if (odp_queue_enq(queue, buf)) { ODP_ERR(" [%i] Queue enqueue failed.\n", thr); return -1; } } Is this the assumed scheduler behavior for ODP (1.0)? As of now there is only one global scheduler envisioned for ODP, it may not be supported by all platforms or supported at the maximum level of performance. Thanks, Alex _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
