Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove util::ipc module (use ipc_channel instead; fixes #12312) #12558
Conversation
highfive
commented
Jul 22, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jul 22, 2016
|
Rebasing, please stand by... |
|
Cool! Happy to see one more out-of-place module go away. :) |
|
Reviewed 4 of 14 files at r1, 11 of 11 files at r2. Comments from Reviewable |
|
Yay, one less dependency on util! @bors-servo r+ |
|
|
Remove util::ipc module (use ipc_channel instead; fixes #12312) <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12312 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring only <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12558) <!-- Reviewable:end -->
|
|
|
From
From
|
|
Let's see if this was bad luck or something more serious... @bors-servo retry |
Remove util::ipc module (use ipc_channel instead; fixes #12312) <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12312 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring only <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12558) <!-- Reviewable:end -->
|
|
|
Getting the same error again. |
|
Ugh. @antrik, we're hitting timeouts due to switching from mpsc channels to ipc ones (for in-process communication). Is that something you'd be interested in looking into? |
|
It turns out the timeouts (at least the This mostly seems to go back to #10230 , i.e. the fact that font data presently is copied rather than shared when sending over IPC channels. There is a lot of that going on here; and while I made the actual send over the socket in This doesn't happen with webrender, presumably because that uses a separate "raw" |
| @@ -373,7 +375,7 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static { | |||
| pub fn create(id: PipelineId, | |||
| url: Url, | |||
| chrome_to_paint_chan: Sender<ChromeToPaintMsg>, | |||
| layout_to_paint_port: Receiver<LayoutToPaintMsg>, | |||
| layout_to_paint_port: IpcReceiver<LayoutToPaintMsg>, | |||
This comment has been minimized.
This comment has been minimized.
asajeffrey
Jul 29, 2016
Member
Ah, is this replacing a channel by an ipc channel? Is this the source of slowdown?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
antrik
Jul 29, 2016
•
Contributor
This is replacing MPSC channels with IPC channels for the single-process case (still the default); it was (obviously) already using IPC channels in the multi-process case.
I don't think we should rely on single-process optimisation if we ever want to make the multi-process case default and/or actually viable. So I don't think this change is bad per se -- it just brings out problems that would have come up anyway if the tests were run with -M...
|
|
| @@ -392,7 +394,8 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static { | |||
| let mut paint_thread = PaintThread { | |||
| id: id, | |||
| _url: url, | |||
| layout_to_paint_port: layout_to_paint_port, | |||
| layout_to_paint_port: | |||
| ROUTER.route_ipc_receiver_to_new_mpsc_receiver(layout_to_paint_port), | |||
This comment has been minimized.
This comment has been minimized.
antrik
Jul 29, 2016
Contributor
It seems a little arbitrary, and possibly confusing, to do the wrapping here: I think it might be clearer to do it right at the place where layout_to_paint_port is originally created -- thus keeping it closer to what the original code did...
|
Just to be explicit, I don't have a clue right now how to make progress with this, so I'll either need a bit more (concrete) guidance or maybe someone else can pick it up. |
|
@djc can we land a change which just gets rid of util/ipc without making other changes, in particular without replacing MPSC channels by IPC channels? |
|
@asajeffrey not really -- unless reimplementing the logic of util/ipc ad hoc, which is surely not the point... |
|
@djc just to avoid possible misunderstanding: your patch is fine in itself (aside for the minor nitpick I pointed out maybe); but it cannot be applied for now, because it exposes other problems, which are not entirely easy to fix. |
|
@asajeffrey let me elaborate, as there seems to be some confusion here: the whole point of |
|
So I guess that as a precursor, some work is needed to make the way the formerly-MPSC channels need to be used more efficiently, somehow? |
|
@djc exactly. As I said, a major win will be fixing the font cache to work again in the face of Independent of that, it might be worth investigating why the layout thread is sending such a huge amount of font data to the paint thread: checking whether this is intended behaviour (relying on a working cache), or some kind of bug/omission... |
|
Rebased in #13831. |
djc commentedJul 22, 2016
•
edited by larsbergstrom
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is