Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932378AbcK1JMP (ORCPT ); Mon, 28 Nov 2016 04:12:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932094AbcK1JMJ (ORCPT ); Mon, 28 Nov 2016 04:12:09 -0500 From: Vitaly Kuznetsov To: Dexuan Cui Cc: Stephen Hemminger , "devel\@linuxdriverproject.org" , "linux-kernel\@vger.kernel.org" , KY Srinivasan , Haiyang Zhang Subject: Re: [PATCH 0/7] hv: CPU onlining/offlining fixes and improvements References: <1480078123-17582-1-git-send-email-vkuznets@redhat.com> <20161126090557.73dd4df7@samsung9.wavecable.com> Date: Mon, 28 Nov 2016 10:12:05 +0100 In-Reply-To: (Dexuan Cui's message of "Mon, 28 Nov 2016 06:56:23 +0000") Message-ID: <87twasezoa.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 28 Nov 2016 09:12:08 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1786 Lines: 39 Dexuan Cui writes: >> From: Stephen Hemminger [mailto:stephen@networkplumber.org] >> Sent: Sunday, November 27, 2016 01:06 >> To: Vitaly Kuznetsov >> Cc: devel@linuxdriverproject.org; linux-kernel@vger.kernel.org; KY Srinivasan >> ; Haiyang Zhang ; Dexuan Cui >> >> Subject: Re: [PATCH 0/7] hv: CPU onlining/offlining fixes and improvements >> >> On Fri, 25 Nov 2016 13:48:36 +0100 >> Vitaly Kuznetsov wrote: >> >> > Some time ago we forbade CPU offlining for Hyper-V and this was sufficient >> > if you boot with all CPUs onlined. Turns out, people may want to limit the >> > number online CPUs by passing 'maxcpus=' kernel parameter and we hit a >> > crash in Hyper-V code in this case. After some thinking, I think we may not >> > only fix the crash but also make the offlining prevention fine-grained: we >> > need to prevent from offlining CPUs which have VMBus channels attached >> > only. All offlined CPUs may always be onlined. >> > >> >> As a temporary solution this is ok, but long term we need to support >> dynamic CPU online/offline. > > If a CPU is bound to some channels, it seems impossible to make it offline, > unless Hyper-V supplies a mechanism to dynamically rebind the channels (i.e. > without closing & opening the channels) to another CPU, e.g. CPU0. > Currently it looks there is no such mechanism. > Exactly. Offlining a CPU with an attached active VMBus channel means killing the device and unless we're offereed an API to rebind it to some other CPU there is no point in allowing that. We may, however, allow offlining CPUs with sub-channels attached by closing these sub-channels, not sure if we want to. -- Vitaly