linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Tomas Glozar <tglozar@redhat.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: [PATCH 3/6] rteval: Exclude isolcpus from kcompile by default
Date: Tue, 25 Jul 2023 09:40:52 -0400 (EDT)	[thread overview]
Message-ID: <9f54b61a-50fc-b3f0-5cdb-9037d35f530@redhat.com> (raw)
In-Reply-To: <20230630091951.916865-4-tglozar@redhat.com>



On Fri, 30 Jun 2023, Tomas Glozar wrote:

> Allows correct calculation of make job count that does not include
> isolated CPUs, on which the loads won't be scheduled.
> 
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---
>  rteval/modules/loads/kcompile.py | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
> index 35ee5cb..30c5965 100644
> --- a/rteval/modules/loads/kcompile.py
> +++ b/rteval/modules/loads/kcompile.py
> @@ -37,6 +37,7 @@ from rteval.systopology import CpuList, SysTopology
>  
>  expand_cpulist = CpuList.expand_cpulist
>  compress_cpulist = CpuList.compress_cpulist
> +nonisolated_cpulist = CpuList.nonisolated_cpulist
>  
>  DEFAULT_KERNEL_PREFIX = "linux-6.1"
>  
> @@ -55,17 +56,20 @@ class KBuildJob:
>          if not os.path.isdir(self.objdir):
>              os.mkdir(self.objdir)
>  
> +        # Exclude isolated CPUs if cpulist not set
> +        cpus_available = len(nonisolated_cpulist(self.node.cpus.cpulist))
> +
>          if os.path.exists('/usr/bin/numactl') and not cpulist:
>              # Use numactl
>              self.binder = f'numactl --cpunodebind {int(self.node)}'
> -            self.jobs = self.calc_jobs_per_cpu() * len(self.node)
> +            self.jobs = self.calc_jobs_per_cpu() * cpus_available
>          elif cpulist:
>              # Use taskset
>              self.jobs = self.calc_jobs_per_cpu() * len(cpulist)
>              self.binder = f'taskset -c {compress_cpulist(cpulist)}'
>          else:
>              # Without numactl calculate number of jobs from the node
> -            self.jobs = self.calc_jobs_per_cpu() * len(self.node)
> +            self.jobs = self.calc_jobs_per_cpu() * cpus_available
>  
>          self.runcmd = f"make O={self.objdir} -C {self.kdir} -j{self.jobs}"
>          self.cleancmd = f"make O={self.objdir} -C {self.kdir} clean allmodconfig"
> -- 
> 2.41.0
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


  reply	other threads:[~2023-07-25 13:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-30  9:19 [PATCH 0/6] rteval: Handle isolcpus correctly Tomas Glozar
2023-06-30  9:19 ` [PATCH 1/6] rteval: Detect isolcpus in systopology Tomas Glozar
2023-07-25 13:33   ` John Kacur
2023-07-25 13:36   ` John Kacur
2023-06-30  9:19 ` [PATCH 2/6] rteval: Report isolated CPUs Tomas Glozar
2023-07-25 13:38   ` John Kacur
2023-06-30  9:19 ` [PATCH 3/6] rteval: Exclude isolcpus from kcompile by default Tomas Glozar
2023-07-25 13:40   ` John Kacur [this message]
2023-06-30  9:19 ` [PATCH 4/6] rteval: Exclude isolcpus from stressng " Tomas Glozar
2023-07-25 13:42   ` John Kacur
2023-06-30  9:19 ` [PATCH 5/6] rteval: Fix CPU count calculation for hackbench Tomas Glozar
2023-07-25 13:44   ` John Kacur
2023-06-30  9:19 ` [PATCH 6/6] rteval: Exclude isolcpus from loads report Tomas Glozar
2023-07-25 14:32   ` John Kacur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f54b61a-50fc-b3f0-5cdb-9037d35f530@redhat.com \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglozar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).