diff --git a/mkinitrd-kill2.sh b/mkinitrd-kill2.sh index 41b7454..73a35b6 100644 --- a/mkinitrd-kill2.sh +++ b/mkinitrd-kill2.sh @@ -18,7 +18,7 @@ if test -n "$blogd_pid" ; then kill -QUIT "$blogd_pid" while [ -d "/proc/$blogd_pid" ]; do - usleep 300000 + usleep 30000 done if [ "$devpts" = "yes" ] ; then umount -t devpts /dev/pts diff --git a/startpar-0.52-preload.diff b/startpar-0.52-preload.diff new file mode 100644 index 0000000..de1fd53 --- /dev/null +++ b/startpar-0.52-preload.diff @@ -0,0 +1,82 @@ +--- startpar.c 2008-07-18 13:25:50.000000000 +0200 ++++ startpar.c 2009-02-12 14:49:10.987760000 +0100 +@@ -29,6 +29,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -64,6 +66,8 @@ + static char *run_mode = NULL; + static struct makenode **nodevec; + ++static enum { Unknown, Preload, NoPreload } ispreload = Unknown; ++ + #define PBUF_SIZE 8192 + struct prg { + char *name; +@@ -248,6 +252,10 @@ + if (read_proc(&prcs_run, &prcs_blked)) + return par; + ++ /* if we have preload running, we expect I/O not to be a problem */ ++ if (ispreload == Preload) ++ prcs_blked = 0; ++ + newpar = (par*numcpu) - prcs_run + 1; /* +1 for startpar its self */ + newpar -= (int)(((double)prcs_blked)*iorate); /* I/O load reduction */ + +@@ -271,6 +279,8 @@ + return checksystem(par, start, false); + } + ++#define SOCK_PATH "/dev/shm/preload_sock" ++ + void run(struct prg *p) + { + char *m = 0; +@@ -341,6 +351,40 @@ + + closeall(); + ++ if (!strcmp(arg, "start")) ++ { ++ int s, t, len; ++ struct sockaddr_un remote; ++ char str[100]; ++ ++ s = socket(AF_UNIX, SOCK_STREAM, 0); ++ if (s != -1) ++ { ++ memset(&remote, 0, sizeof(struct sockaddr_un)); ++ remote.sun_family = AF_UNIX; ++ strcpy(remote.sun_path, SOCK_PATH); ++ len = strlen(remote.sun_path) + sizeof(remote.sun_family); ++ ++ t = connect(s, (struct sockaddr *)&remote, len); ++ if (t != -1) ++ { ++ ispreload = Preload; ++ send(s, p->name, strlen(p->name), 0); ++ recv(s, str, 100, 0); ++ } ++ else if ( ispreload == Unknown) ++ { ++ /* ++ * if we connected to preload once, we know it ran. ++ * In case we can't connect to it later, it means it did ++ * its job and we can guess I/O is no longer a problem. ++ */ ++ ispreload = NoPreload; ++ } ++ close(s); ++ } ++ } ++ + if (run_mode) + { + char path[128]; + diff --git a/sysvinit.changes b/sysvinit.changes index 3125ea4..c92b59a 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 12 14:53:14 CET 2009 - coolo@suse.de + +- support preload in its job in giving it the init scripts to preload +- don't wait 0.3s when we need only 0.03 + ------------------------------------------------------------------- Fri Feb 6 00:36:27 CET 2009 - ro@suse.de diff --git a/sysvinit.spec b/sysvinit.spec index 25379c9..f3f4596 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -30,7 +30,7 @@ Group: System/Base PreReq: coreutils AutoReqProv: on Version: 2.86 -Release: 193 +Release: 194 Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libselinux-devel libsepol-devel @@ -63,6 +63,7 @@ Patch16: sysvinit-2.86-full-time.patch Patch17: sysvinit-2.86-hddown.patch Patch18: sysvinit-2.86-selinux.patch Patch19: sysvinit-2.86-fuse-no-kill.patch +Patch20: startpar-0.52-preload.diff %description System V style init programs by Miquel van Smoorenburg that control the @@ -110,6 +111,7 @@ pushd ../showconsole-%{SCVER} popd pushd ../startpar-%{START} %patch -P 14 +%patch -P 20 popd %_fixowner . %_fixgroup . @@ -321,6 +323,9 @@ rm -rf ${RPM_BUILD_ROOT} %doc %{_mandir}/man8/mkill.8.gz %changelog +* Thu Feb 12 2009 coolo@suse.de +- support preload in its job in giving it the init scripts to preload +- don't wait 0.3s when we need only 0.03 * Fri Feb 06 2009 ro@suse.de - fix build (move static int loop before first usage) * Tue Jan 27 2009 werner@suse.de