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

Issue 3723005: AU: Pass opened device fd from update engine to bspatch. (Closed)

Created:
10 years, 2 months ago by adlr
Modified:
9 years ago
Reviewers:
petkov
CC:
chromium-os-reviews_chromium.org, petkov, adlr
Base URL:
ssh://git@chromiumos-git/update_engine.git
Visibility:
Public.

Description

AU: Pass opened device fd from update engine to bspatch. Whenever a device is written and closes, some processing happens (involving udev, devicekit-disks, udev, and even chrome). Historically, bspatch called open, write, close on the raw device, thus causing much CPU usage every time bspatch was called, which can be many times per second for delta updates. This CL causes us to pass /dev/fd/## and the file descriptor to bspatch. A corresponding CL causes bspatch to detect this and skip open/close calls. Together, these CLs dramatically reduce resource usage on clients performing delta updates. BUG=7636 TEST=unittests; tested delta update on device Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=5a23283

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix for review (StringPrintf()) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -15 lines) Patch
M delta_performer.cc View 1 2 chunks +5 lines, -2 lines 0 comments Download
M subprocess.h View 1 chunk +6 lines, -1 line 0 comments Download
M subprocess.cc View 2 chunks +14 lines, -12 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
adlr
10 years, 2 months ago (2010-10-12 21:50:31 UTC) #1
petkov
10 years, 2 months ago (2010-10-12 21:56:35 UTC) #2
LGTM

http://codereview.chromium.org/3723005/diff/1/2
File delta_performer.cc (right):

http://codereview.chromium.org/3723005/diff/1/2#newcode449
delta_performer.cc:449: const string& path = "/dev/fd/" + StringPrintf("%d",
fd);
... = StringPrintf("/dev/fd/%d"), fd);

Powered by Google App Engine
This is Rietveld 408576698