Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2516045ima; Mon, 22 Oct 2018 11:02:31 -0700 (PDT) X-Google-Smtp-Source: AJdET5czldvT0uNQAIYJRty1KUDjneAVB0pIgbgQiIexdTm4Vmyua9oh+lMd0D8EH3qzgqBuwmqg X-Received: by 2002:a17:902:d907:: with SMTP id c7-v6mr3781183plz.198.1540231351500; Mon, 22 Oct 2018 11:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540231351; cv=none; d=google.com; s=arc-20160816; b=v1NWtPT76QXZJ4adZdeReCbYMp85wbzqyPmiWX8t+oFjPZMLe7zhdQ/wvAmXzH+dzX ED2OxKwvtrkfSnE2q3dKxn/ZCO8HECEqPeo27n3qu6SYdVevgEe2NwqCtnWA0t4AILUd IByf25wcpFJ7cDAEh6GCoAz1xtIM2EbtKOhOPMU63y0WZBZI0ag2Tq0uPZZTROsTTJhy bLYBTSIFJ/3ih2ZjXAIwqzi20a8mzoOefX5qQg8SLQ5C2j9wh77JCNF4moerQVdwIg7u L3yrWjdhwEy8MI5lSn4ibV/iks9dPhmmJqhp9dMKINqlVi+z1HynQRfY5A2YRPmhmKEV IS1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=LZ9PAH8PqguElydC4gXnQNz9eKsVkKU9FqW/AqqpyCU=; b=nX4BQwWd1wKWf9FRlZS/044l5D3ncCtTgMK94hGTKkaWBGem3O+FWzCNfCEPwVv6Hx a8mSHuS5M6RxgzCX6D+hQ2fuZkMSQ1q/PKRlumJ2ylFtxvVAR1bub1eBzaekc12PRKbP DC+HEDParJP3XvWSB+7aZhoLsFy6hvRe0jt6RRILhhqR2b/FYBgytiuWepd4PV9fO+g+ 2OVkQ1j6jRoxzwhC88dRjlkV0DRJHH9qD7VIdwwV3NokGl1b4YVAHGUS5AgDVynNjn5F 4oMu+ti7UGJ/B1kiaDBnDePXFaSDF1xU0HeplPYw8UIA6C2V0Gloo+4kF6nVb9P2udIF IGQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7-v6si6800993pln.66.2018.10.22.11.02.15; Mon, 22 Oct 2018 11:02:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728517AbeJWCVW (ORCPT + 99 others); Mon, 22 Oct 2018 22:21:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727463AbeJWCVW (ORCPT ); Mon, 22 Oct 2018 22:21:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3308CA1DA; Mon, 22 Oct 2018 18:01:49 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-8.bos.redhat.com [10.18.17.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AB2C194AA; Mon, 22 Oct 2018 18:01:48 +0000 (UTC) Subject: Re: [PATCH v1 2/2] x86/hyperv: make HvNotifyLongSpinWait hypercall To: Peter Zijlstra Cc: Juergen Gross , Yi Sun , linux-kernel@vger.kernel.org, x86@kernel.org, tglx@linutronix.de, chao.p.peng@intel.com, chao.gao@intel.com, isaku.yamahata@intel.com, michael.h.kelley@microsoft.com, tianyu.lan@microsoft.com, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "mingo@redhat.com" , Will Deacon References: <1539954835-34035-1-git-send-email-yi.y.sun@linux.intel.com> <1539954835-34035-3-git-send-email-yi.y.sun@linux.intel.com> <20181022015342.GK11769@yi.y.sun> <2e0d62cb-b706-a5b4-65f7-982a913fb32b@suse.com> <20181022171516.GH3117@worktop.programming.kicks-ass.net> <6d8095c0-af95-5967-3ca5-2ceeb74233ea@redhat.com> <20181022173144.GB3109@worktop.c.hoisthospitality.com> From: Waiman Long Organization: Red Hat Message-ID: <0f36b234-fa4e-d52f-735c-078ddeab6720@redhat.com> Date: Mon, 22 Oct 2018 14:01:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20181022173144.GB3109@worktop.c.hoisthospitality.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 22 Oct 2018 18:01:50 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/22/2018 01:31 PM, Peter Zijlstra wrote: > On Mon, Oct 22, 2018 at 01:27:27PM -0400, Waiman Long wrote: > >>>> I agree with Juergen on that. I would suggest rename the >>>> vcpu_is_preempted hook into a more generic vcpu_stop_spinning, perhaps, >>>> so different hypervisors can act on the information accordingly. Adding >>>> an extra parameter is fine. >>> No; no extra parameters. vcpu_is_preempted() is a simple and intuitive >>> interface. Why would we want to make it complicated? >> Hyperv seems to do it in a somewhat different way by looking at the spin >> counter and decide if it should continue. I don't know why they do that >> and what advantage it has. >> >> The current patch is definitely not OK. A revised patch that makes use >> of an existing paravirt hook will be more acceptable. Again, I would >> like to see some performance figure and why they do it this way to see >> if it is worthwhile to change the existing interface. > Note that there are vcpu_is_preempted() users that are not in a > spin-loop. You are right. I forgot about that. In that case, someone has to prove that using an alternative way to stop spinning really has a performance advantage compared to what we already have today. Cheers, Longman