On Mon, Jun 10, 2013 at 04:24:42PM -0400, Cristian Rodr?guez wrote:
El 10/06/13 09:44, Mel Gorman escribió:
I'd like to submit a new package called numad to factory.
This is a system daemon that attempts to identify processes that should be bound to NUMA nodes to improve overall performance on machines with multiple nodes. In preparation for working on the next stage of in-kernel automatic NUMA balancing support I compared current in-kernel automatic NUMA balancing, numad and manual tuning. In some cases numad can out-perform the current in-kernel implementation although in other cases it will actually perform worse than running with defaults. The expected cases where it performs better and worse are documented in the RPM description and the manual page.
https://build.opensuse.org/package/show?package=numad&project=home%3Amgorman
What is less clear to me is what project I should submit this to. I set the RPM group to System/Daemons and the Base:System devel project looked like a reasonable fit. Any suggestions on a suitable alternative or on how the package can be improved before submissions are welcome.
Just a few objections/observations,
- please do not add new init scripts to factory.
Seems fair but I was aiming to create a package that would also be compatible with older versions of openSUSEi (12.2 in particular). Is the following diff the correct way of doing that? --- numad.spec (revision 3) +++ numad.spec (working copy) @@ -68,22 +68,24 @@ %makeinstall prefix=$RPM_BUILD_ROOT%{_prefix} install gzip $RPM_BUILD_ROOT%{_mandir}/man8/numad.8 %{__install} -D -m 644 numad.conf $RPM_BUILD_ROOT/etc/numad.conf +%if 0%{?has_systemd} +install -D -m 0644 numad.service %{buildroot}%{_unitdir}/numad.service +%else %{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/init.d %{__install} -m 744 numad.init $RPM_BUILD_ROOT%{_sysconfdir}/init.d/numad ln -sf ../../etc/init.d/numad $RPM_BUILD_ROOT/usr/sbin/rcnumad -%if 0%{?has_systemd} -install -D -m 0644 numad.service %{buildroot}%{_unitdir}/numad.service %endif %files %defattr(-,root,root) %{_sbindir}/numad -%{_sbindir}/rcnumad %{_mandir}/man8/numad.8.gz %config /etc/numad.conf -%config /etc/init.d/numad %if 0%{?has_systemd} %{_unitdir}/numad.service +%else +%{_sbindir}/rcnumad +%config /etc/init.d/numad %endif %pre
- the systemd service file : (comments inline
[Unit] Description=numad - The NUMA daemon that manages application locality.
After=syslog.target --> Not needed or used anymore, does nothing.
Removed.
[Service] Type=forking
Can you make the service of type "simple" ? that is, a non-forking service ?
Easily, I should have caught that. The only forking it does is related to becoming a daemon.
the number of "forking" services implementing all the needed step correctly can be counted with one hand and there will be free fingers to hold a glass of wine. (read: all are racy at startup)
If that's not possible , ensure you use the PidFile directive as well.
ExecStop=/usr/sbin/numad -i 0
If the daemon reacts properly to SIGTERM please completely omit that line and let systemd to take care of the process.
The daemon does not handle SIGTERM properly. If it's killed with TERM then it'll leave the pidfile behind and complain about it the next time it starts up. I was surprised by this because the upstream init script assumes that SIGTERM is handled properly even though the manual page states Setting a <max_interval> of zero will cause the daemon to exit. (This is the normal mechanism to terminate the daemon.) Thanks for the review. -- Mel Gorman SUSE Labs -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org