linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers
@ 2020-04-06 22:14 Scott Wood
  2020-04-06 22:14 ` [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args Scott Wood
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Scott Wood @ 2020-04-06 22:14 UTC (permalink / raw)
  To: John Kacur; +Cc: Clark Williams, linux-rt-users, Scott Wood

setup.py installs into /usr/local by default, but the makefile
is still creating directories in /usr that it doesn't install
anything into.  Worse, the uninstall target removes things
from /usr rather than what was installed by "make install".

Signed-off-by: Scott Wood <swood@redhat.com>
---
 Makefile | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/Makefile b/Makefile
index f784ba778bc3..f91e6e06a9a4 100644
--- a/Makefile
+++ b/Makefile
@@ -15,9 +15,6 @@ XMLRPCDIR := server
 DESTDIR	:=
 PREFIX  :=      /usr
 DATADIR	:=	$(DESTDIR)/$(PREFIX)/share
-CONFDIR	:=	$(DESTDIR)/etc
-MANDIR	:=	$(DESTDIR)/$(PREFIX)/share/man
-PYLIB	:= 	$(DESTDIR)$(shell $(PYTHON) -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
 LOADDIR	:=	loadsource
 
 KLOAD	:=	$(LOADDIR)/linux-5.1.tar.xz
@@ -60,17 +57,6 @@ install_loads:	$(LOADS)
 
 installdirs:
 	[ -d $(DATADIR)/rteval ] || mkdir -p $(DATADIR)/rteval
-	[ -d $(CONFDIR) ] || mkdir -p $(CONFDIR)
-	[ -d $(MANDIR)/man8 ]  || mkdir -p $(MANDIR)/man8
-	[ -d $(PYLIB) ]   || mkdir -p $(PYLIB)
-	[ -d $(DESTDIR)/usr/bin ] || mkdir -p $(DESTDIR)/usr/bin
-
-uninstall:
-	rm -f /usr/bin/rteval
-	rm -f $(CONFDIR)/rteval.conf
-	rm -f $(MANDIR)/man8/rteval.8.gz
-	rm -rf $(PYLIB)/rteval
-	rm -rf $(DATADIR)/rteval
 
 tarfile: rteval-$(VERSION).tar.bz2
 
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args
  2020-04-06 22:14 [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers Scott Wood
@ 2020-04-06 22:14 ` Scott Wood
  2020-04-07 14:54   ` John Kacur
  2020-04-06 22:14 ` [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running Scott Wood
  2020-04-07 14:53 ` [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers John Kacur
  2 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2020-04-06 22:14 UTC (permalink / raw)
  To: John Kacur; +Cc: Clark Williams, linux-rt-users, Scott Wood

Otherwise, this fails on python3.

Signed-off-by: Scott Wood <swood@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f91e6e06a9a4..479bda8d8674 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ else
 	PYTHON = python2
 endif
 PACKAGE :=	rteval
-VERSION :=      $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION")
+VERSION :=      $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print(RTEVAL_VERSION)")
 D	:=	10
 
 # XML-RPC related files
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running
  2020-04-06 22:14 [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers Scott Wood
  2020-04-06 22:14 ` [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args Scott Wood
@ 2020-04-06 22:14 ` Scott Wood
  2020-04-07 14:55   ` John Kacur
  2020-04-07 14:53 ` [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers John Kacur
  2 siblings, 1 reply; 6+ messages in thread
From: Scott Wood @ 2020-04-06 22:14 UTC (permalink / raw)
  To: John Kacur; +Cc: Clark Williams, linux-rt-users, Scott Wood

Each module is responsible for respawning the load when it finishes.  The
only thing that the additional check at the rtevalModulePrototype level
accomplishes is introducing a race condition that will kill rteval if a
load ends after _WorkloadTask() checks, but before the check in the
caller.

Signed-off-by: Scott Wood <swood@redhat.com>
---
 rteval/modules/__init__.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py
index 0feb8a916179..5ae7cd488406 100644
--- a/rteval/modules/__init__.py
+++ b/rteval/modules/__init__.py
@@ -189,9 +189,6 @@ class rtevalModulePrototype(threading.Thread):
 
                 if self.shouldStop():
                     break
-                if not self.WorkloadAlive():
-                    self._log(Log.DEBUG, "%s workload stopped running." % self._module_type)
-                    break
                 time.sleep(self.__sleeptime)
 
             self.__timestamps["runloop_stop"] = datetime.now()
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers
  2020-04-06 22:14 [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers Scott Wood
  2020-04-06 22:14 ` [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args Scott Wood
  2020-04-06 22:14 ` [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running Scott Wood
@ 2020-04-07 14:53 ` John Kacur
  2 siblings, 0 replies; 6+ messages in thread
From: John Kacur @ 2020-04-07 14:53 UTC (permalink / raw)
  To: Scott Wood; +Cc: Clark Williams, linux-rt-users



On Mon, 6 Apr 2020, Scott Wood wrote:

> setup.py installs into /usr/local by default, but the makefile
> is still creating directories in /usr that it doesn't install
> anything into.  Worse, the uninstall target removes things
> from /usr rather than what was installed by "make install".
> 
> Signed-off-by: Scott Wood <swood@redhat.com>
> ---
>  Makefile | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index f784ba778bc3..f91e6e06a9a4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -15,9 +15,6 @@ XMLRPCDIR := server
>  DESTDIR	:=
>  PREFIX  :=      /usr
>  DATADIR	:=	$(DESTDIR)/$(PREFIX)/share
> -CONFDIR	:=	$(DESTDIR)/etc
> -MANDIR	:=	$(DESTDIR)/$(PREFIX)/share/man
> -PYLIB	:= 	$(DESTDIR)$(shell $(PYTHON) -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
>  LOADDIR	:=	loadsource
>  
>  KLOAD	:=	$(LOADDIR)/linux-5.1.tar.xz
> @@ -60,17 +57,6 @@ install_loads:	$(LOADS)
>  
>  installdirs:
>  	[ -d $(DATADIR)/rteval ] || mkdir -p $(DATADIR)/rteval
> -	[ -d $(CONFDIR) ] || mkdir -p $(CONFDIR)
> -	[ -d $(MANDIR)/man8 ]  || mkdir -p $(MANDIR)/man8
> -	[ -d $(PYLIB) ]   || mkdir -p $(PYLIB)
> -	[ -d $(DESTDIR)/usr/bin ] || mkdir -p $(DESTDIR)/usr/bin
> -
> -uninstall:
> -	rm -f /usr/bin/rteval
> -	rm -f $(CONFDIR)/rteval.conf
> -	rm -f $(MANDIR)/man8/rteval.8.gz
> -	rm -rf $(PYLIB)/rteval
> -	rm -rf $(DATADIR)/rteval
>  
>  tarfile: rteval-$(VERSION).tar.bz2
>  
> -- 
> 2.18.2
> 
> 

As you've probably guessed, the distribution spec file doesn't use the 
Makefile at all when installing, just setup.py
This is left over from when Clark and David were first writing this.

The default target in the Makefile is runit
Which is a great way to do sanity check after creating patches, so I
would like that to work - which your next patch does do. This stuff
should be cleaned-up though, so
 
Signed-off-by: John Kacur <jkacur@redhat.com>

For people who are reading this and don't know what rteval is, it's a 
program that runs cyclictest as a measurement thread on various cpus while 
running various programs a loads at the same time.

Mostly it works quite well, but in some spots the code is pretty rough.
Not all of the upstream code is packaged for distributing, so if you see
code that doesn't work in python3, that's probably why, it's not currently 
shipped.

This is all open source, so anyone is welcome to look at it and send us 
patches. It's available at 

git://git.kernel.org/pub/scm/utils/rteval/rteval


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args
  2020-04-06 22:14 ` [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args Scott Wood
@ 2020-04-07 14:54   ` John Kacur
  0 siblings, 0 replies; 6+ messages in thread
From: John Kacur @ 2020-04-07 14:54 UTC (permalink / raw)
  To: Scott Wood; +Cc: Clark Williams, linux-rt-users



On Mon, 6 Apr 2020, Scott Wood wrote:

> Otherwise, this fails on python3.
> 
> Signed-off-by: Scott Wood <swood@redhat.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index f91e6e06a9a4..479bda8d8674 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -5,7 +5,7 @@ else
>  	PYTHON = python2
>  endif
>  PACKAGE :=	rteval
> -VERSION :=      $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION")
> +VERSION :=      $(shell $(PYTHON) -c "from rteval import RTEVAL_VERSION; print(RTEVAL_VERSION)")
>  D	:=	10
>  
>  # XML-RPC related files
> -- 
> 2.18.2
> 
> 

Tested by running the default target (runit)

Thanks for fixing

Signed-off-by: John Kacur <jkacur@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running
  2020-04-06 22:14 ` [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running Scott Wood
@ 2020-04-07 14:55   ` John Kacur
  0 siblings, 0 replies; 6+ messages in thread
From: John Kacur @ 2020-04-07 14:55 UTC (permalink / raw)
  To: Scott Wood; +Cc: Clark Williams, linux-rt-users



On Mon, 6 Apr 2020, Scott Wood wrote:

> Each module is responsible for respawning the load when it finishes.  The
> only thing that the additional check at the rtevalModulePrototype level
> accomplishes is introducing a race condition that will kill rteval if a
> load ends after _WorkloadTask() checks, but before the check in the
> caller.
> 
> Signed-off-by: Scott Wood <swood@redhat.com>
> ---
>  rteval/modules/__init__.py | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py
> index 0feb8a916179..5ae7cd488406 100644
> --- a/rteval/modules/__init__.py
> +++ b/rteval/modules/__init__.py
> @@ -189,9 +189,6 @@ class rtevalModulePrototype(threading.Thread):
>  
>                  if self.shouldStop():
>                      break
> -                if not self.WorkloadAlive():
> -                    self._log(Log.DEBUG, "%s workload stopped running." % self._module_type)
> -                    break
>                  time.sleep(self.__sleeptime)
>  
>              self.__timestamps["runloop_stop"] = datetime.now()
> -- 
> 2.18.2
> 
> 

Signed-off-by: John Kacur <jkacur@redhat.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-07 14:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 22:14 [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers Scott Wood
2020-04-06 22:14 ` [RTEVAL PATCH 2/3] Makefile: Use parentheses around print args Scott Wood
2020-04-07 14:54   ` John Kacur
2020-04-06 22:14 ` [RTEVAL PATCH 3/3] modules: Don't abort if a workload isn't running Scott Wood
2020-04-07 14:55   ` John Kacur
2020-04-07 14:53 ` [RTEVAL PATCH 1/3] Makefile: Remove non-distutil install leftovers John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).