mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Babu Moger <babu.moger@amd.com>, <fenghua.yu@intel.com>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<corbet@lwn.net>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>, <eranian@google.com>,
	<peternewman@google.com>
Subject: Re: [RFC PATCH 2/3] x86/resctrl: Move the task's threads to the group automatically
Date: Wed, 4 Jan 2023 08:43:03 -0800	[thread overview]
Message-ID: <21a4f7d7-eec6-f04e-9707-59236c0f937f@intel.com> (raw)
In-Reply-To: <167278360189.34228.2442698916556329960.stgit@bmoger-ubuntu>

Hi Babu,

On 1/3/2023 2:06 PM, Babu Moger wrote:
> Some micro benchmarks run multiple threads when started. Monitoring
> (or controlling) the benchmark using the task id is bit tricky. Users
> need to track all the threads and assign them individually to monitor
> or control. For example:
>   $stream_lowOverhead -codeAlg 13 -nRep 100000 -cores 0 1 2 3 -memMB 32
>   -alignKB 8192 -aPadB 0 -bPadB 0 -cPadB 0 -testMask 1
> 
>   $pidof stream_lowOverhead
>   6793
>
> This benchmark actually runs multiple threads underneath on the cores
> listed above. It can be seen with the command:
>   $ps -T -p 6793
>    PID   SPID TTY          TIME CMD
>   6793   6793 pts/2    00:00:00 stream_lowOverh
>   6793   6802 pts/2    00:01:25 stream_lowOverh
>   6793   6803 pts/2    00:01:25 stream_lowOverh
>   6793   6804 pts/2    00:01:25 stream_lowOverh
>   6793   6805 pts/2    00:01:25 stream_lowOverh
> 
> Users need to assign these threads individually to the resctrl group for
> monitoring or controlling.
> 
>   $echo 6793 > /sys/fs/restrl/clos1/tasks
>   $echo 6802 > /sys/fs/restrl/clos1/tasks
>   $echo 6803 > /sys/fs/restrl/clos1/tasks
>   $echo 6804 > /sys/fs/restrl/clos1/tasks
>   $echo 6805 > /sys/fs/restrl/clos1/tasks
> 
> That is not easy when dealing with numerous threads.

How about:

# echo $$ > /sys/fs/resctrl/clos1/tasks
# stream_lowOverhead -codeAlg 13 -nRep 100000 -cores 0 1 2 3 -memMB 32\
   -alignKB 8192 -aPadB 0 -bPadB 0 -cPadB 0 -testMask 1


Reinette

  parent reply	other threads:[~2023-01-04 16:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 22:06 [RFC PATCH 0/3] x86/resctrl: Miscellaneous resctrl features Babu Moger
2023-01-03 22:06 ` [RFC PATCH 1/3] x86/resctrl: Add multiple tasks to the resctrl group at once Babu Moger
2023-01-04  5:46   ` Yu, Fenghua
2023-01-04 17:20     ` Moger, Babu
2023-01-03 22:06 ` [RFC PATCH 2/3] x86/resctrl: Move the task's threads to the group automatically Babu Moger
2023-01-04  5:55   ` Yu, Fenghua
2023-01-04 17:49     ` Moger, Babu
2023-01-04 16:43   ` Reinette Chatre [this message]
2023-01-04 18:06     ` Moger, Babu
2023-01-03 22:06 ` [RFC PATCH 3/3] x86/resctrl: Display the RMID and COSID for resctrl groups Babu Moger
2023-01-04  6:06   ` Yu, Fenghua
2023-01-04  6:45     ` Stephane Eranian
2023-01-04 18:01       ` Moger, Babu
2023-01-04 17:58     ` Moger, Babu
2023-01-04 23:54       ` Yu, Fenghua
2023-01-05 15:48         ` Moger, Babu

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=21a4f7d7-eec6-f04e-9707-59236c0f937f@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=eranian@google.com \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peternewman@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®