From: David Laight <David.Laight@ACULAB.COM>
To: 'Parth Shah' <parth@linux.ibm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"patrick.bellasi@matbug.net" <patrick.bellasi@matbug.net>,
"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
"valentin.schneider@arm.com" <valentin.schneider@arm.com>,
"qais.yousef@arm.com" <qais.yousef@arm.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"pavel@ucw.cz" <pavel@ucw.cz>,
"mingo@redhat.com" <mingo@redhat.com>,
"morten.rasmussen@arm.com" <morten.rasmussen@arm.com>,
"pjt@google.com" <pjt@google.com>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"tj@kernel.org" <tj@kernel.org>,
"rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"dhaval.giani@oracle.com" <dhaval.giani@oracle.com>,
"quentin.perret@arm.com" <quentin.perret@arm.com>,
subhra mazumdar <subhra.mazumdar@oracle.com>,
"ggherdovich@suse.cz" <ggherdovich@suse.cz>,
"viresh.kumar@linaro.org" <viresh.kumar@linaro.org>,
Doug Smythies <dsmythies@telus.net>
Subject: RE: [Discussion v2] Usecases for the per-task latency-nice attribute
Date: Wed, 2 Oct 2019 16:11:41 +0000 [thread overview]
Message-ID: <9645e7c625a84bfabac001fd6ef35559@AcuMS.aculab.com> (raw)
In-Reply-To: <2bd46086-43ff-f130-8720-8eec694eb55b@linux.ibm.com>
From: Parth Shah
> Sent: 30 September 2019 11:44
...
> 5> Separating AVX512 tasks and latency sensitive tasks on separate cores
> ( -Tim Chen )
> ===========================================================================
> Another usecase we are considering is to segregate those workload that will
> pull down core cpu frequency (e.g. AVX512) from workload that are latency
> sensitive. There are certain tasks that need to provide a fast response
> time (latency sensitive) and they are best scheduled on cpu that has a
> lighter load and not have other tasks running on the sibling cpu that could
> pull down the cpu core frequency.
>
> Some users are running machine learning batch tasks with AVX512, and have
> observed that these tasks affect the tasks needing a fast response. They
> have to rely on manual CPU affinity to separate these tasks. With
> appropriate latency hint on task, the scheduler can be taught to separate them.
Has this been diagnosed properly?
I can't really see how the frequency drop from AVX512 significantly affects latency.
Most tasks that require low latency probably don't do a lot of work.
It is much more likely that the latency issues happen because the AVX512 tasks
are doing very few system calls so can't be pre-empted even by a high priority task.
This 'feature' is hinted by this:
> 2> TurboSched
> ( -Parth Shah )
> ====================
> TurboSched [2] tries to minimize the number of active cores in a socket by
> packing an un-important and low-utilization (named jitter) task on an
> already active core and thus refrains from waking up of a new core if
> possible.
Consider this example of a process that requires low latency (sub 1ms would be good):
- A hardware interrupt (or timer interrupt) wakes up on thread.
- When that thread wakes it wakes up other threads that are sleeping.
- All the threads 'beaver away' for a few ms (processing RTP and other audio).
- They all sleep for the rest of a 10ms period.
The affinities are set so each thread runs on a separate cpu, and all are SCHED_RR.
Now loop all the cpus in userspace (run: while :; do :; done) and see what happens to the latencies.
You really want the SCHED_RR threads to immediately pre-empt the running processes.
But I suspect nothing happens until a timer interrupt to the target cpu.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2019-10-02 16:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 10:43 Parth Shah
2019-10-02 16:11 ` David Laight [this message]
2019-10-07 8:46 ` Parth Shah
2019-10-07 17:06 ` Tim Chen
2019-10-24 8:19 ` Parth Shah
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=9645e7c625a84bfabac001fd6ef35559@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=daniel.lezcano@linaro.org \
--cc=dhaval.giani@oracle.com \
--cc=dietmar.eggemann@arm.com \
--cc=dsmythies@telus.net \
--cc=ggherdovich@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=parth@linux.ibm.com \
--cc=patrick.bellasi@matbug.net \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=qais.yousef@arm.com \
--cc=quentin.perret@arm.com \
--cc=rafael.j.wysocki@intel.com \
--cc=subhra.mazumdar@oracle.com \
--cc=tim.c.chen@linux.intel.com \
--cc=tj@kernel.org \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.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
Powered by JetHome