From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030340AbbDQO54 (ORCPT ); Fri, 17 Apr 2015 10:57:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39873 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932192AbbDQO5w (ORCPT ); Fri, 17 Apr 2015 10:57:52 -0400 Message-ID: <55311F6A.5030304@redhat.com> Date: Fri, 17 Apr 2015 16:57:46 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Peter Zijlstra CC: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, gleb@kernel.org, kvm@vger.kernel.org, Ralf Baechle , mtosatti@redhat.com, luto@kernel.org Subject: Re: [GIT PULL] First batch of KVM changes for 4.1 References: <1428678089-16291-1-git-send-email-pbonzini@redhat.com> <20150417085238.GJ17717@twins.programming.kicks-ass.net> <20150417091745.GA24151@twins.programming.kicks-ass.net> <5530DBED.5080508@redhat.com> <20150417103654.GE5029@twins.programming.kicks-ass.net> <5530E28F.2030401@redhat.com> <20150417105506.GF5029@twins.programming.kicks-ass.net> <553100C1.5000408@redhat.com> <20150417131037.GG23123@twins.programming.kicks-ass.net> <55310CF2.6070107@redhat.com> <20150417134335.GI23123@twins.programming.kicks-ass.net> In-Reply-To: <20150417134335.GI23123@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/04/2015 15:43, Peter Zijlstra wrote: > On Fri, Apr 17, 2015 at 03:38:58PM +0200, Paolo Bonzini wrote: >>> The path this notifier is called from has nothing to do with those >>> costs. > > Its attributed to the entity doing the migration, which can be the > wakeup path or a softirq. And we very much do care about the wakeup > path. It's not run on all wakeups. It's within an "if (task_cpu(p) != new_cpu)". WF_MIGRATED _is_ a slow path for wakeups, even though wakeup itself is of course something we care about. For load balancing, calculate_imbalance alone is orders of magnitudes more expensive than this notifier (which can be optimized to two instructions with at most one cache miss). >> ... that's a valid objection. Please look at the patch below. > > Still a NAK on that, distros have no choice but to enable that CONFIG > option because people might want to run KVM. Again: running virtual machines does not require these notifiers. KVM needs preempt and MMU notifiers, and also enables user return notifiers, but does not need these ones. It's only paravirt that needs them. It's perfectly fine for distros to disable paravirt. Some do, some don't. Paolo