Nir Soffer has posted comments on this change.

Change subject: lib: allow to set system thread names
......................................................................


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/41052/3/lib/vdsm/threadname.py
File lib/vdsm/threadname.py:

Line 40:         'pthread_setname_np unavailable. '
Line 41:         'System thread names will not be set.')
Line 42: 
Line 43: 
Line 44: def systemname(name):
> Maybe pthreadname()? This is low level non portable thing
Even better name - setname()

    import pthread

    @pthread.setname("vdsm-mail-spm")
    def run(self):
        ...
Line 45:     """
Line 46:     Allows to set a system-wide thread name.
Line 47:     This decorator should be used on `func' callables which implement
Line 48:     a threading.Thread target.


https://gerrit.ovirt.org/#/c/41052/3/vdsm.spec.in
File vdsm.spec.in:

Line 1333: %{python_sitelib}/%{vdsm_name}/response.py*
Line 1334: %{python_sitelib}/%{vdsm_name}/netconfpersistence.py*
Line 1335: %{python_sitelib}/%{vdsm_name}/schedule.py*
Line 1336: %{python_sitelib}/%{vdsm_name}/sslutils.py*
Line 1337: %{python_sitelib}/%{vdsm_name}/threadname.py*
The best name for this module is pthread.py, and the function/decorator 
pthread.setname()

However we already have pthread.py in pthreading - maybe this should go into 
pthreading?

When we stop using pthreading, we can use our own pthread.py module.
Line 1338: %{python_sitelib}/%{vdsm_name}/sysctl.py*
Line 1339: %{python_sitelib}/%{vdsm_name}/udevadm.py*
Line 1340: %{python_sitelib}/%{vdsm_name}/utils.py*
Line 1341: %{python_sitelib}/%{vdsm_name}/vdscli.py*


-- 
To view, visit https://gerrit.ovirt.org/41052
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib96bd0471a07449d2a0a0328137e8437aefad901
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to