From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: devel@linuxdriverproject.org,
"K. Y. Srinivasan" <kys@microsoft.com>,
"Haiyang Zhang" <haiyangz@microsoft.com>,
linux-kernel@vger.kernel.org, "Dexuan Cui" <decui@microsoft.com>,
"Ingo Molnar" <mingo@kernel.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable
Date: Tue, 19 May 2015 17:58:47 +0200 [thread overview]
Message-ID: <87vbfo4kzs.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20150519151939.GG3644@twins.programming.kicks-ass.net> (Peter Zijlstra's message of "Tue, 19 May 2015 17:19:39 +0200")
Peter Zijlstra <peterz@infradead.org> writes:
> On Tue, May 19, 2015 at 02:15:41PM +0200, Vitaly Kuznetsov wrote:
>> Loaded Hyper-V module will use these functions to disable CPU hotplug
>> under certain circumstances.
>
> What's wrong with get_online_cpus() ?
We need to disable cpu offlining permanently (till the module is
unloaded but this is highly unlikely). If we do get_online_cpus()
instead we get
# echo 0 > /sys/devices/system/cpu/cpu1/online
<nothing happens, pemanent hang followed by the following:>
[ 240.247109] INFO: task bash:972 blocked for more than 120 seconds.
[ 240.248937] Not tainted 4.1.0-rc3_bug1167380_test_rkr+ #602
[ 240.250515] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
disables this message.
[ 240.252379] bash D ffff880021b83c18 0 972 939
0x00000004
[ 240.255068] ffff880021b83c18 0000000000000001 0000000000000046
ffff880021b83be8
[ 240.258140] ffffffff81fdcdb0 ffff880037dbcfc0 ffff880037203bd0
ffffffff81fdcdb8
[ 240.261275] ffff880021b84000 0000000000000001 0000000000000000
0000000000000001
[ 240.264402] Call Trace:
[ 240.265423] [<ffffffff81aecf77>] schedule+0x37/0x90
[ 240.266748] [<ffffffff81081872>] cpu_hotplug_begin+0xd2/0xe0
[ 240.268210] [<ffffffff810817a5>] ? cpu_hotplug_begin+0x5/0xe0
[ 240.269675] [<ffffffff810cb860>] ? prepare_to_wait_event+0xf0/0xf0
[ 240.271285] [<ffffffff81ad561a>] _cpu_down+0x8a/0x300
[ 240.275294] [<ffffffff81ad58c6>] cpu_down+0x36/0x50
[ 240.276680] [<ffffffff8160f954>] cpu_subsys_offline+0x14/0x20
[ 240.278145] [<ffffffff8160a505>] device_offline+0xa5/0xd0
[ 240.279618] [<ffffffff8160a620>] online_store+0x50/0xa0
[ 240.280991] [<ffffffff81607678>] dev_attr_store+0x18/0x30
...
And if we do the cpu_hotplug_disable() call we get:
# echo 0 > /sys/devices/system/cpu/cpu1/online
-bash: echo: write error: Device or resource busy
This behavior is preferable.
--
Vitaly
next prev parent reply other threads:[~2015-05-19 15:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 12:15 [PATCH 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention Vitaly Kuznetsov
2015-05-19 12:15 ` [PATCH 1/2] cpu-hotplug: export cpu_hotplug_enable/cpu_hotplug_disable Vitaly Kuznetsov
2015-05-19 14:02 ` Radim Krčmář
2015-05-19 15:19 ` Peter Zijlstra
2015-05-19 15:58 ` Vitaly Kuznetsov [this message]
2015-05-19 12:15 ` [PATCH 2/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable Vitaly Kuznetsov
2015-05-20 22:35 ` [PATCH 0/2] Drivers: hv: vmbus: use cpu_hotplug_enable/disable for CPU offlining prevention KY Srinivasan
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=87vbfo4kzs.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=decui@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.