Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canvas: Move to shared memory for images and canvas backing stores. #6705

Merged
merged 1 commit into from
Jul 24, 2015

Conversation

pcwalton
Copy link
Contributor

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and serde serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 23, 2015
@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/5630

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@pcwalton
Copy link
Contributor Author

BTW, the alternatives here were:

  • Disable the tests in question.
  • Hack around the lack of optimization by writing in unsafe code or C.
  • Get Cargo to be able to optimize a subset of crates, and block on a Cargo upgrade.
  • Switch tests to run in optimized builds of Servo.
  • Wait for serde to get bincode support and hope that's enough.
  • Wait for the specialization RFC to be accepted and implemented, then block on a Rust upgrade.

None of these options seemed particularly compelling to me, so I elected to take this approach. There is a risk that some of this will be rolled back when images are no longer sent to layout at all, but that requires some more heavy lifting (so that the paint task can find the image/canvas contents without layout directly supplying them to it) and we can easily roll back the change for images if we want to.

@jdm
Copy link
Member

jdm commented Jul 23, 2015

@bors-servo: r+
Makes sense.

@bors-servo
Copy link
Contributor

📌 Commit 2a4e023 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit 2a4e023 with merge 798db8e...

bors-servo pushed a commit that referenced this pull request Jul 23, 2015
canvas: Move to shared memory for images and canvas backing stores.

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6705)
<!-- Reviewable:end -->
@jdm jdm added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 23, 2015
@bors-servo
Copy link
Contributor

💔 Test failed - android

@pcwalton pcwalton force-pushed the image-cache-shmem branch from 2a4e023 to d01bca6 Compare July 23, 2015 06:32
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 23, 2015
@pcwalton
Copy link
Contributor Author

@bors-servo: r=jdm

@bors-servo
Copy link
Contributor

📌 Commit d01bca6 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit d01bca6 with merge 0efe98b...

bors-servo pushed a commit that referenced this pull request Jul 23, 2015
canvas: Move to shared memory for images and canvas backing stores.

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6705)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - android

@jdm
Copy link
Member

jdm commented Jul 23, 2015

/home/servo/.cargo/git/checkouts/ipc-channel-d95a23d1f1577bfc/master/platform/linux/mod.rs:801:18: 801:28 error: mismatched types:
 expected `u16`,
    found `u32`
(expected u16,
    found u32) [E0308]
/home/servo/.cargo/git/checkouts/ipc-channel-d95a23d1f1577bfc/master/platform/linux/mod.rs:801         S_ISSOCK(st.st_mode)
                                                                                                                ^~~~~~~~~~

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 23, 2015
@pcwalton pcwalton force-pushed the image-cache-shmem branch from d01bca6 to 0d1a5e1 Compare July 23, 2015 06:48
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Jul 23, 2015
@pcwalton
Copy link
Contributor Author

@bors-servo: r=jdm

@bors-servo
Copy link
Contributor

📌 Commit 0d1a5e1 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit 0d1a5e1 with merge 1257e23...

bors-servo pushed a commit that referenced this pull request Jul 23, 2015
canvas: Move to shared memory for images and canvas backing stores.

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6705)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

📌 Commit 0461ae9 has been approved by jdm

@pcwalton
Copy link
Contributor Author

Tested locally now that we're running WPT in release.

@jdm jdm added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 24, 2015
@bors-servo
Copy link
Contributor

⌛ Testing commit 0461ae9 with merge ace452d...

bors-servo pushed a commit that referenced this pull request Jul 24, 2015
canvas: Move to shared memory for images and canvas backing stores.

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6705)
<!-- Reviewable:end -->
@pcwalton
Copy link
Contributor Author

Along with the rest of e10s, this is currently blocked either on generating the metadata needed to move our WPT usage to release builds, rust-lang/cargo#1826 (which won't land due to design issues), or removing IPC on Linux.

@bors-servo
Copy link
Contributor

💔 Test failed - linux2

@jdm
Copy link
Member

jdm commented Jul 24, 2015

/dom/ranges/Range-insertNode.html
---------------------------------
TIMEOUT [Parent]
/dom/ranges/Range-mutations.html
--------------------------------
TIMEOUT [Parent]
/dom/ranges/Range-surroundContents.html
---------------------------------------
TIMEOUT [Parent]

@pcwalton
Copy link
Contributor Author

@bors-servo: r=jdm

@bors-servo
Copy link
Contributor

📌 Commit 0461ae9 has been approved by jdm

@pcwalton
Copy link
Contributor Author

@bors-servo: retry

@bors-servo
Copy link
Contributor

⌛ Testing commit 0461ae9 with merge 43c5117...

bors-servo pushed a commit that referenced this pull request Jul 24, 2015
canvas: Move to shared memory for images and canvas backing stores.

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6705)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux2

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.
@pcwalton pcwalton force-pushed the image-cache-shmem branch from 0461ae9 to 6269749 Compare July 24, 2015 23:14
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jul 24, 2015
@pcwalton
Copy link
Contributor Author

@bors-servo: r=jdm

@bors-servo
Copy link
Contributor

📌 Commit 6269749 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit 6269749 with merge ed1b6a3...

bors-servo pushed a commit that referenced this pull request Jul 24, 2015
canvas: Move to shared memory for images and canvas backing stores.

The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.

r? @jdm

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6705)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, gonk, linux1, linux2, linux3, mac1, mac2, mac3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-awaiting-review There is new code that needs to be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants