RfC: Context-associated MicrotaskQueue

29 views
Skip to first unread message

Taiju Tsuiki

unread,
Feb 21, 2018, 9:27:46 AM2/21/18
to V8-dev, platform-architecture-dev
Hi, V8 devs.

I wrote up a design doc for Context-associated Microtask Queue for finer grained control on Blink scheduler.
Could you take a look to it?

Dmitry Gozman

unread,
Feb 21, 2018, 9:41:46 AM2/21/18
to Taiju Tsuiki, V8-dev, platform-architecture-dev
Sorry, I wasn't able to comment on the doc for some reason.

Can we get MicrotaskQueue from a v8::Context through some API? In inspector [1] we'd like to follow blink's scheduling, but do not have access to blink's code.
Related question: why do we need a separate queue, and not just pass a Context meaning one implicit queue per context?

Thanks,
Dmitry


--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAFK_eqRmWnYdxpEcViojpoCjd%2BBYHV2Jkb-vccQNd9KnokkDGQ%40mail.gmail.com.

Kentaro Hara

unread,
Feb 21, 2018, 1:17:34 PM2/21/18
to Dmitry Gozman, Taiju Tsuiki, V8-dev, platform-architecture-dev
The goal (i.e., make the microtask execution per event loop) looks good to me.

However, I'm not sure why you want to associate microtask queues with v8::Context. Microtask queues need to be associated with event loops, don't they? For example, one v8::Context may be used by multiple event loops (over time).





On Wed, Feb 21, 2018 at 6:41 AM, Dmitry Gozman <dgo...@chromium.org> wrote:
Sorry, I wasn't able to comment on the doc for some reason.

Can we get MicrotaskQueue from a v8::Context through some API? In inspector [1] we'd like to follow blink's scheduling, but do not have access to blink's code.
Related question: why do we need a separate queue, and not just pass a Context meaning one implicit queue per context?

Thanks,
Dmitry

On Wed, Feb 21, 2018 at 6:27 AM, Taiju Tsuiki <tz...@chromium.org> wrote:
Hi, V8 devs.

I wrote up a design doc for Context-associated Microtask Queue for finer grained control on Blink scheduler.
Could you take a look to it?

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.

Adam Klein

unread,
Feb 21, 2018, 5:45:17 PM2/21/18
to Kentaro Hara, Dmitry Gozman, Taiju Tsuiki, V8-dev, platform-architecture-dev
I've commented with some detailed questions on the doc, but I second Kentaro's high-level concern: per-Context doesn't seem like the right granularity to me.

On Wed, Feb 21, 2018 at 10:17 AM, Kentaro Hara <har...@chromium.org> wrote:
The goal (i.e., make the microtask execution per event loop) looks good to me.

However, I'm not sure why you want to associate microtask queues with v8::Context. Microtask queues need to be associated with event loops, don't they? For example, one v8::Context may be used by multiple event loops (over time).




On Wed, Feb 21, 2018 at 6:41 AM, Dmitry Gozman <dgo...@chromium.org> wrote:
Sorry, I wasn't able to comment on the doc for some reason.

Can we get MicrotaskQueue from a v8::Context through some API? In inspector [1] we'd like to follow blink's scheduling, but do not have access to blink's code.
Related question: why do we need a separate queue, and not just pass a Context meaning one implicit queue per context?

Thanks,
Dmitry


On Wed, Feb 21, 2018 at 6:27 AM, Taiju Tsuiki <tz...@chromium.org> wrote:
Hi, V8 devs.

I wrote up a design doc for Context-associated Microtask Queue for finer grained control on Blink scheduler.
Could you take a look to it?

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAFK_eqRmWnYdxpEcViojpoCjd%2BBYHV2Jkb-vccQNd9KnokkDGQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsubsc...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.
--
Kentaro Hara, Tokyo, Japan

--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architecture-dev+unsub...@chromium.org.
To post to this group, send email to platform-architecture-dev@chromium.org.

Adam Klein

unread,
Feb 21, 2018, 5:45:48 PM2/21/18
to Kentaro Hara, Dmitry Gozman, Taiju Tsuiki, V8-dev, platform-architecture-dev

Adam Klein

unread,
Feb 21, 2018, 5:46:55 PM2/21/18
to Kentaro Hara, Dmitry Gozman, Taiju Tsuiki, platform-architecture-dev, v8-...@googlegroups.com
-v8-...@google.com (which doesn't exist), +v8-...@chromium.org (which does).

On Wed, Feb 21, 2018 at 2:45 PM, Adam Klein <ad...@google.com> wrote:
Reply all
Reply to author
Forward
0 new messages