[Skiboot] [RFC PATCH 4/6] core/flash: Make opal_flash_op() actually asynchronous
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Thu Feb 28 23:55:59 AEDT 2019
On 02/28/2019 11:48 AM, Stewart Smith wrote:
> From: Cyril Bur <cyril.bur at au1.ibm.com>
>
.../...
> -err:
> + if (size - len) {
> + /* Work remains */
> + schedule_timer(&flash->async.poller, 0);
Why are we calling schedule_time with 0?
> }
> diff --git a/core/timer.c b/core/timer.c
> index 1c539517839e..c68f978ccb07 100644
> --- a/core/timer.c
> +++ b/core/timer.c
> @@ -199,6 +199,7 @@ static void __check_poll_timers(uint64_t now)
> static void __check_timers(uint64_t now)
> {
> struct timer *t;
> + uint64_t stop = now + msecs_to_tb(50); /* Run timers for max 5ms */
I'm not sure why we need this change. Can you please elaborate?
>
> for (;;) {
> t = list_top(&timer_list, struct timer, link);
> @@ -229,6 +230,12 @@ static void __check_timers(uint64_t now)
>
> /* Update time stamp */
> now = mftb();
> +
> + /* Only run timers for a limited time to avoid jitter */
> + if (now > stop) {
> + prlog(PR_PRINTF, "Run timers for > 50ms\n");
> + break;
> + }
> }
> }
-Vasant
More information about the Skiboot
mailing list