Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Issue 12918004: mmap the opened file descriptor in the renderer process, close the fd in the browser process. (Closed)

Created:
7 years, 9 months ago by reed1
Modified:
7 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, bungeman-skia
Visibility:
Public.

Description

mmap the opened file descriptor in the renderer process, close the fd in the browser process. This avoids running out of available file descriptors when many tabs are opened, since we now never leave a file open for very long, and rely on the kernel to clean up the mmap'd regions when the tab is closed (or the stream is safely destroyed by the font cache). BUG=196549 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188813

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Total comments: 15

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -3 lines) Patch
M content/browser/renderer_host/render_sandbox_host_linux.cc View 1 2 1 chunk +6 lines, -0 lines 1 comment Download
M content/common/font_config_ipc_linux.cc View 1 2 3 4 5 3 chunks +70 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
jln (very slow on Chromium)
https://codereview.chromium.org/12918004/diff/1/content/browser/renderer_host/render_sandbox_host_linux.cc File content/browser/renderer_host/render_sandbox_host_linux.cc (right): https://codereview.chromium.org/12918004/diff/1/content/browser/renderer_host/render_sandbox_host_linux.cc#newcode229 content/browser/renderer_host/render_sandbox_host_linux.cc:229: close(result_fd); Please, add HANDLE_EINTR + DCHECK https://codereview.chromium.org/12918004/diff/1/content/common/font_config_ipc_linux.cc File content/common/font_config_ipc_linux.cc ...
7 years, 9 months ago (2013-03-18 16:07:21 UTC) #1
jln (very slow on Chromium)
> DCHECK(HANDLE_EINTR(close(result_fd))); DCHECK(! ...) of course, sorry.
7 years, 9 months ago (2013-03-18 16:08:27 UTC) #2
reed1
https://codereview.chromium.org/12918004/diff/1/content/common/font_config_ipc_linux.cc File content/common/font_config_ipc_linux.cc (right): https://codereview.chromium.org/12918004/diff/1/content/common/font_config_ipc_linux.cc#newcode162 content/common/font_config_ipc_linux.cc:162: return new SkFileDescriptorStream(result_fd); On 2013/03/18 16:07:21, Julien Tinnes wrote: ...
7 years, 9 months ago (2013-03-18 16:12:47 UTC) #3
jln (very slow on Chromium)
On 2013/03/18 16:12:47, reed1 wrote: > Good point. It is not the imnmediate caller (this ...
7 years, 9 months ago (2013-03-18 16:16:51 UTC) #4
reed1
Ah, got it. Thanks all. I did not realize it was being dup'd in SendRendererReply. ...
7 years, 9 months ago (2013-03-18 16:18:34 UTC) #5
jln (very slow on Chromium)
On 2013/03/18 16:16:51, Julien Tinnes wrote: > On 2013/03/18 16:12:47, reed1 wrote: > > > ...
7 years, 9 months ago (2013-03-18 16:19:24 UTC) #6
reed1
On 2013/03/18 16:19:24, Julien Tinnes wrote: > On 2013/03/18 16:16:51, Julien Tinnes wrote: > > ...
7 years, 9 months ago (2013-03-18 16:23:25 UTC) #7
jln (very slow on Chromium)
https://codereview.chromium.org/12918004/diff/7001/content/browser/renderer_host/render_sandbox_host_linux.cc File content/browser/renderer_host/render_sandbox_host_linux.cc (right): https://codereview.chromium.org/12918004/diff/7001/content/browser/renderer_host/render_sandbox_host_linux.cc#newcode229 content/browser/renderer_host/render_sandbox_host_linux.cc:229: close(result_fd); Please, add HANDLE_EINTR and DCHECK (or CHECK) here. ...
7 years, 9 months ago (2013-03-18 16:26:06 UTC) #8
reed1
https://codereview.chromium.org/12918004/diff/1/content/browser/renderer_host/render_sandbox_host_linux.cc File content/browser/renderer_host/render_sandbox_host_linux.cc (right): https://codereview.chromium.org/12918004/diff/1/content/browser/renderer_host/render_sandbox_host_linux.cc#newcode229 content/browser/renderer_host/render_sandbox_host_linux.cc:229: close(result_fd); On 2013/03/18 16:07:21, Julien Tinnes wrote: > Please, ...
7 years, 9 months ago (2013-03-18 16:56:07 UTC) #9
jln (very slow on Chromium)
https://codereview.chromium.org/12918004/diff/10001/content/common/font_config_ipc_linux.cc File content/common/font_config_ipc_linux.cc (right): https://codereview.chromium.org/12918004/diff/10001/content/common/font_config_ipc_linux.cc#newcode24 content/common/font_config_ipc_linux.cc:24: class SkFileDescriptorStream : public SkStream { General nit: why ...
7 years, 9 months ago (2013-03-18 18:25:37 UTC) #10
reed1
https://codereview.chromium.org/12918004/diff/10001/content/common/font_config_ipc_linux.cc File content/common/font_config_ipc_linux.cc (right): https://codereview.chromium.org/12918004/diff/10001/content/common/font_config_ipc_linux.cc#newcode24 content/common/font_config_ipc_linux.cc:24: class SkFileDescriptorStream : public SkStream { On 2013/03/18 18:25:37, ...
7 years, 9 months ago (2013-03-18 18:42:34 UTC) #11
reed1
patchset #5 just fixes indents. PTAL
7 years, 9 months ago (2013-03-18 19:09:42 UTC) #12
jln (very slow on Chromium)
lgtm https://codereview.chromium.org/12918004/diff/13001/content/common/font_config_ipc_linux.cc File content/common/font_config_ipc_linux.cc (right): https://codereview.chromium.org/12918004/diff/13001/content/common/font_config_ipc_linux.cc#newcode25 content/common/font_config_ipc_linux.cc:25: public: Nit: public should be only indented with ...
7 years, 9 months ago (2013-03-18 19:21:27 UTC) #13
jln (very slow on Chromium)
Also in your commit message make sure you use "BUG=196549". I don't think the current ...
7 years, 9 months ago (2013-03-18 19:23:03 UTC) #14
reed1
On 2013/03/18 19:23:03, Julien Tinnes wrote: > Also in your commit message make sure you ...
7 years, 9 months ago (2013-03-18 19:26:33 UTC) #15
reed1
https://codereview.chromium.org/12918004/diff/13001/content/common/font_config_ipc_linux.cc File content/common/font_config_ipc_linux.cc (right): https://codereview.chromium.org/12918004/diff/13001/content/common/font_config_ipc_linux.cc#newcode25 content/common/font_config_ipc_linux.cc:25: public: On 2013/03/18 19:21:28, Julien Tinnes wrote: > Nit: ...
7 years, 9 months ago (2013-03-18 19:26:39 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/reed@google.com/12918004/8002
7 years, 9 months ago (2013-03-18 19:35:34 UTC) #17
commit-bot: I haz the power
Presubmit check for 12918004-8002 failed and returned exit status 1. INFO:root:Found 2 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-18 19:35:36 UTC) #18
reed1
adding piman for OWNER
7 years, 9 months ago (2013-03-18 19:40:37 UTC) #19
piman
https://codereview.chromium.org/12918004/diff/8002/content/browser/renderer_host/render_sandbox_host_linux.cc File content/browser/renderer_host/render_sandbox_host_linux.cc (right): https://codereview.chromium.org/12918004/diff/8002/content/browser/renderer_host/render_sandbox_host_linux.cc#newcode231 content/browser/renderer_host/render_sandbox_host_linux.cc:231: DCHECK(!HANDLE_EINTR(close(result_fd))); I'm not the biggest fan of side-effects inside ...
7 years, 9 months ago (2013-03-18 19:49:14 UTC) #20
jln (very slow on Chromium)
On 2013/03/18 19:49:14, piman wrote: > I'm not the biggest fan of side-effects inside of ...
7 years, 9 months ago (2013-03-18 20:00:16 UTC) #21
reed1
https://codereview.chromium.org/12918004/diff/8002/content/browser/renderer_host/render_sandbox_host_linux.cc File content/browser/renderer_host/render_sandbox_host_linux.cc (right): https://codereview.chromium.org/12918004/diff/8002/content/browser/renderer_host/render_sandbox_host_linux.cc#newcode231 content/browser/renderer_host/render_sandbox_host_linux.cc:231: DCHECK(!HANDLE_EINTR(close(result_fd))); On 2013/03/18 19:49:14, piman wrote: > I'm not ...
7 years, 9 months ago (2013-03-18 20:15:40 UTC) #22
piman
lgtm
7 years, 9 months ago (2013-03-18 20:17:59 UTC) #23
reed1
Thanks all. In hindsight, I think all of the changes to font_config_ipc_linux.cc were unnecessary to ...
7 years, 9 months ago (2013-03-18 20:21:34 UTC) #24
reed1
Committed patchset #6 manually as r188813 (presubmit successful).
7 years, 9 months ago (2013-03-18 21:01:35 UTC) #25
jln (very slow on Chromium)
https://codereview.chromium.org/12918004/diff/3006/content/browser/renderer_host/render_sandbox_host_linux.cc File content/browser/renderer_host/render_sandbox_host_linux.cc (right): https://codereview.chromium.org/12918004/diff/3006/content/browser/renderer_host/render_sandbox_host_linux.cc#newcode231 content/browser/renderer_host/render_sandbox_host_linux.cc:231: DCHECK(!HANDLE_EINTR(close(result_fd))); We missed moving this out of DCHECK. And ...
7 years, 9 months ago (2013-03-19 10:23:27 UTC) #26
reed1
7 years, 9 months ago (2013-03-19 12:27:06 UTC) #27
Message was sent while issue was closed.
On 2013/03/19 10:23:27, Julien Tinnes wrote:
>
https://codereview.chromium.org/12918004/diff/3006/content/browser/renderer_h...
> File content/browser/renderer_host/render_sandbox_host_linux.cc (right):
> 
>
https://codereview.chromium.org/12918004/diff/3006/content/browser/renderer_h...
> content/browser/renderer_host/render_sandbox_host_linux.cc:231:
> DCHECK(!HANDLE_EINTR(close(result_fd)));
> We missed moving this out of DCHECK. And it's arguably the most important.
Sorry
> again about that.

Good catch. Naturally, I did my testing in a debug build, so that close() was
executed, and I missed the problem.

Powered by Google App Engine
This is Rietveld 408576698