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

Issue 6720005: enter_chroot: introduce a sync process that synchronizes given files between chroot and host (Closed)

Created:
9 years, 8 months ago by zbehan
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush, sosa
Visibility:
Public.

Description

enter_chroot: introduce a sync process that synchronizes given files between chroot and host Currently used for resolv.conf and hosts, because these files can change during the lifetime of a chroot, for example on computers with more dynamic network (laptops). While this creates a persistent process in the background for the sole purpose of syncing files, the performance impact is negligible. BUG=12316 TEST=below 1) enter_chroot once+quit, many times + quit, verify correct exit behaviour 2) enter_chroot, modify host resolv.conf, see chroot being updated Change-Id: I26573570c027acc2c214a00838a6f982a7585b13 R=robotboy@chromium.org,dparker@chromium.org,sosa@chromium.org Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=e28239d

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M enter_chroot.sh View 3 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
zbehan
9 years, 8 months ago (2011-04-02 05:33:51 UTC) #1
kliegs
How much impact will this have with multiple chroots open in different environments? I typically ...
9 years, 8 months ago (2011-04-02 21:02:15 UTC) #2
zbehan
The performance impact is really unmeasurable. Most of the time is spent comparing the files, ...
9 years, 8 months ago (2011-04-02 22:50:34 UTC) #3
kliegs
Ok good points. Just was a bit wary of how this might scale. I t ...
9 years, 8 months ago (2011-04-04 16:53:00 UTC) #4
zbehan
Can move the current const higher, but I prefered to keep it locally with the ...
9 years, 8 months ago (2011-04-04 17:16:42 UTC) #5
sosa
Why copy/sync rather than mount bind them read-only?
9 years, 8 months ago (2011-04-04 21:12:40 UTC) #6
zbehan
Mount binding files is too funky. I'm not even sure it's officially supported, more like ...
9 years, 8 months ago (2011-04-04 23:03:10 UTC) #7
zbehan
Ping? :) On Tue, Apr 5, 2011 at 1:03 AM, Zdenek Behan <zbehan@chromium.org> wrote: > ...
9 years, 8 months ago (2011-04-05 21:31:26 UTC) #8
robotboy
LGTM, thanks.
9 years, 8 months ago (2011-04-06 21:25:55 UTC) #9
zbehan
9 years, 8 months ago (2011-04-06 22:37:11 UTC) #10
As a reference point, a sync process that has been running in my chroot
since 2/4 (6 days) has consumed 34 seconds of cpu time, that translates to
an average load of 0.006% on a single-core machine.

On Wed, Apr 6, 2011 at 11:25 PM, <robotboy@chromium.org> wrote:

> LGTM, thanks.
>
>
> http://codereview.chromium.org/6720005/
>

Powered by Google App Engine
This is Rietveld 408576698