From: Viresh Kumar <viresh.kumar@linaro.org>
To: tglx@linutronix.de, fweisbec@gmail.com, peterz@infradead.org,
mingo@kernel.org, tj@kernel.org, lizefan@huawei.com
Cc: linaro-kernel@lists.linaro.org, linaro-networking@linaro.org,
Arvind.Chauhan@arm.com, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>
Subject: [PATCH V2 0/8] cpusets: Isolate CPUs via sysfs using cpusets
Date: Fri, 4 Apr 2014 14:05:27 +0530 [thread overview]
Message-ID: <cover.1396599474.git.viresh.kumar@linaro.org> (raw)
We need to migrate away all the background kernel activities (Unbound) for
systems requiring isolation of cores (HPC, Real time, networking, etc). After
creating cpusets, you can write 1 or 0 to cpuset.quiesce file.
In our case, we are working on a networking machine which wants to run time
critical data plane threads on some CPUs, i.e. a single thread per CPU. And
these CPUs shouldn't be interrupted at all by background kernel activities, like
timers/hrtimers/workqueues/etc..
Writing '1': on this file would migrate unbound/unpinned timers and hrtimers
away from the CPUs of the cpuset in question. Also it would disallow addition of
any new unpinned timers & hrtimers to isolated CPUs.
Writing '0': will disable isolation of CPUs in current cpuset and unpinned
timers/hrtimers would be allowed in future on these CPUs.
This patchset allow us to do this. In the first few patches it builds basic
infrastructure in timers and hrtimers and then finally use that in cpusets. Also
it updates get_nohz_timer_target() to stop adding new timers/hrtimers to these
isolated CPUs.
V1: https://lkml.org/lkml/2014/3/20/319
Not many comments received.
Based on some other timers/hrtimers cleanup I did:
http://comments.gmane.org/gmane.linux.kernel/1677797
Available here: git://git.linaro.org/people/viresh.kumar/linux.git isolate-cpusets
V1->V2:
- Add support to migrate hrtimers as well (V1 only had timers)
- cpuset.quiesce now supports writing 0 and reading as well
- update get_nohz_timer_target() to stop adding new timers/hrtimers to these
isolated CPUs.
- Minor fixups that I noticed
Known issues:
1. Patch: "timer: track pinned timers with TIMER_PINNED flag", following
reporting by kbuild system (Don't know how to fix this):
config: make ARCH=blackfin allyesconfig
Note: the vireshk/timer-cleanup-for-tglx HEAD
ea63467ac9150cd86f4d960887116f99a2803b56 builds fine. It only hurts
bisectibility.
All error/warnings:
kernel/timer.c: In function 'init_timers':
>> kernel/timer.c:1683:2: error: call to '__compiletime_assert_1683'
>> declared with attribute error: BUILD_BUG_ON failed:
>> __alignof__(struct tvec_base) & TIMER_FLAG_MASK
2. Patch: "timer: don't migrate pinned timers", following reporting by kbuild
system (Not really a problem created due to this patch, but just highlighted
an existing bug. As pinned timers must be removed by owners before CPU goes
down):
smpboot: CPU 1 is now offline
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1935 at kernel/timer.c:1621 migrate_timer_list+0xd6/0xf0()
migrate_timer_list: can't migrate pinned timer: ffffffff81f06a60, deactivating it
Modules linked in:
Viresh Kumar (8):
timer: track pinned timers with TIMER_PINNED flag
timer: don't migrate pinned timers
timer: create timer_quiesce_cpu() to isolate CPU from timers
hrtimer: update timer->state with 'pinned' information
hrtimer: don't migrate pinned timers
hrtimer: create hrtimer_quiesce_cpu() to isolate CPU from hrtimers
cpuset: Create sysfs file: cpusets.quiesce to isolate CPUs
sched: don't queue timers on quiesced CPUs
Documentation/cgroups/cpusets.txt | 19 +++++++-
include/linux/cpuset.h | 8 ++++
include/linux/hrtimer.h | 6 +++
include/linux/timer.h | 13 ++++--
kernel/cpuset.c | 76 ++++++++++++++++++++++++++++++++
kernel/hrtimer.c | 69 ++++++++++++++++++++++++-----
kernel/sched/core.c | 9 ++--
kernel/timer.c | 91 +++++++++++++++++++++++++++++++--------
8 files changed, 253 insertions(+), 38 deletions(-)
--
1.7.12.rc2.18.g61b472e
next reply other threads:[~2014-04-04 8:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 8:35 Viresh Kumar [this message]
2014-04-04 8:35 ` [PATCH V2 1/8] timer: track pinned timers with TIMER_PINNED flag Viresh Kumar
2014-04-04 8:35 ` [PATCH V2 5/8] hrtimer: don't migrate pinned timers Viresh Kumar
2014-04-04 8:35 ` [PATCH V2 6/8] hrtimer: create hrtimer_quiesce_cpu() to isolate CPU from hrtimers Viresh Kumar
2014-04-04 8:35 ` [PATCH V2 7/8] cpuset: Create sysfs file: cpusets.quiesce to isolate CPUs Viresh Kumar
2014-04-04 8:35 ` [PATCH V2 8/8] sched: don't queue timers on quiesced CPUs Viresh Kumar
[not found] ` <cover.1396599474.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-04 8:35 ` [PATCH V2 2/8] timer: don't migrate pinned timers Viresh Kumar
2014-04-04 8:35 ` [PATCH V2 3/8] timer: create timer_quiesce_cpu() to isolate CPU from timers Viresh Kumar
2014-04-04 8:35 ` [PATCH V2 4/8] hrtimer: update timer->state with 'pinned' information Viresh Kumar
2014-04-06 8:30 ` [PATCH V2 0/8] cpusets: Isolate CPUs via sysfs using cpusets Mike Galbraith
2014-04-07 4:11 ` Viresh Kumar
[not found] ` <CAKohpomW3jpQEqFxD3m_br8GchJyq9-KSxW2x7JLCRqDgf4SAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-07 5:04 ` Mike Galbraith
[not found] ` <1396847090.5218.9.camel-YqMYhexLQo31wTEvPJ5Q0F6hYfS7NtTn@public.gmane.org>
2014-04-07 5:17 ` Viresh Kumar
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=cover.1396599474.git.viresh.kumar@linaro.org \
--to=viresh.kumar@linaro.org \
--cc=Arvind.Chauhan@arm.com \
--cc=cgroups@vger.kernel.org \
--cc=fweisbec@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linaro-networking@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tj@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