* [PATCH] opkg: Don't call sync() when installing into an offline root
@ 2012-09-29 12:20 Phil Blundell
2012-10-02 15:15 ` Saul Wold
0 siblings, 1 reply; 2+ messages in thread
From: Phil Blundell @ 2012-09-29 12:20 UTC (permalink / raw)
To: openembedded-core
Even when installing onto a live target system, calling sync() during
package installation is of somewhat questionable benefit. But calling
it on the build host during rootfs construction is certainly useless and
can cause I/O to stall for several seconds on even a moderately sized
host which is clearly not desirable.
(From a patch originally by Mike Crowe.)
Signed-off-by: Phil Blundell <philb@gnu.org>
---
.../opkg/opkg/opkg-no-sync-offline.patch | 18 ++++++++++++++++++
meta/recipes-devtools/opkg/opkg_svn.bb | 3 ++-
2 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
diff --git a/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch b/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
new file mode 100644
index 0000000..b1b3453
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
@@ -0,0 +1,18 @@
+When installing into an offline root, calling sync() is pointless and just
+hurts performance. Don't let's do that.
+
+Signed-off-by: Phil Blundell <philb@gnu.org>
+Upstream-Status: Pending
+
+--- a/libopkg/opkg_cmd.c 2011-09-08 10:53:07.000000000 +0100
++++ b/libopkg/opkg_cmd.c 2011-10-04 10:45:22.278615584 +0100
+@@ -64,7 +64,8 @@ write_status_files_if_changed(void)
+ opkg_msg(INFO, "Writing status file.\n");
+ opkg_conf_write_status_files();
+ pkg_write_changed_filelists();
+- sync();
++ if (!conf->offline_root)
++ sync();
+ } else {
+ opkg_msg(DEBUG, "Nothing to be done.\n");
+ }
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index 820a224..f206cd5 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -9,6 +9,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
file://0006-detect-circular-dependencies.patch \
file://0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch \
file://0008-select_higher_version.patch \
+ file://opkg-no-sync-offline.patch \
"
S = "${WORKDIR}/trunk"
@@ -16,4 +17,4 @@ S = "${WORKDIR}/trunk"
SRCREV = "633"
PV = "0.1.8+svnr${SRCPV}"
-PR = "${INC_PR}.4"
+PR = "${INC_PR}.5"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] opkg: Don't call sync() when installing into an offline root
2012-09-29 12:20 [PATCH] opkg: Don't call sync() when installing into an offline root Phil Blundell
@ 2012-10-02 15:15 ` Saul Wold
0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2012-10-02 15:15 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On 09/29/2012 05:20 AM, Phil Blundell wrote:
> Even when installing onto a live target system, calling sync() during
> package installation is of somewhat questionable benefit. But calling
> it on the build host during rootfs construction is certainly useless and
> can cause I/O to stall for several seconds on even a moderately sized
> host which is clearly not desirable.
>
> (From a patch originally by Mike Crowe.)
>
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
> .../opkg/opkg/opkg-no-sync-offline.patch | 18 ++++++++++++++++++
> meta/recipes-devtools/opkg/opkg_svn.bb | 3 ++-
> 2 files changed, 20 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
>
> diff --git a/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch b/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
> new file mode 100644
> index 0000000..b1b3453
> --- /dev/null
> +++ b/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
> @@ -0,0 +1,18 @@
> +When installing into an offline root, calling sync() is pointless and just
> +hurts performance. Don't let's do that.
> +
> +Signed-off-by: Phil Blundell <philb@gnu.org>
> +Upstream-Status: Pending
> +
> +--- a/libopkg/opkg_cmd.c 2011-09-08 10:53:07.000000000 +0100
> ++++ b/libopkg/opkg_cmd.c 2011-10-04 10:45:22.278615584 +0100
> +@@ -64,7 +64,8 @@ write_status_files_if_changed(void)
> + opkg_msg(INFO, "Writing status file.\n");
> + opkg_conf_write_status_files();
> + pkg_write_changed_filelists();
> +- sync();
> ++ if (!conf->offline_root)
> ++ sync();
> + } else {
> + opkg_msg(DEBUG, "Nothing to be done.\n");
> + }
> diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
> index 820a224..f206cd5 100644
> --- a/meta/recipes-devtools/opkg/opkg_svn.bb
> +++ b/meta/recipes-devtools/opkg/opkg_svn.bb
> @@ -9,6 +9,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
> file://0006-detect-circular-dependencies.patch \
> file://0007-merge-newpkg-provides-even-when-oldpkg-provides-exis.patch \
> file://0008-select_higher_version.patch \
> + file://opkg-no-sync-offline.patch \
> "
>
> S = "${WORKDIR}/trunk"
> @@ -16,4 +17,4 @@ S = "${WORKDIR}/trunk"
> SRCREV = "633"
> PV = "0.1.8+svnr${SRCPV}"
>
> -PR = "${INC_PR}.4"
> +PR = "${INC_PR}.5"
>
Merged into OE-Core (with additional PR bump)
Thanks
Sau!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-02 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-29 12:20 [PATCH] opkg: Don't call sync() when installing into an offline root Phil Blundell
2012-10-02 15:15 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox