From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755624AbdKBNZx (ORCPT ); Thu, 2 Nov 2017 09:25:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57011 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752483AbdKBNZv (ORCPT ); Thu, 2 Nov 2017 09:25:51 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 62D2AFECE Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH-tip v2 2/2] x86/xen: Deprecate xen_nopvspin To: Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Jonathan Corbet Cc: x86@kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Juergen Gross , Alok Kataria , Rusty Russell , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Peter Zijlstra References: <1509569934-4919-1-git-send-email-longman@redhat.com> <1509569934-4919-3-git-send-email-longman@redhat.com> <5c36ed18-e59e-1ea3-28e0-414f88965761@oracle.com> From: Waiman Long Organization: Red Hat Message-ID: <2fb79da7-4c95-160a-a626-670c536f490a@redhat.com> Date: Thu, 2 Nov 2017 09:25:36 -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: <5c36ed18-e59e-1ea3-28e0-414f88965761@oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 02 Nov 2017 13:25:51 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/01/2017 06:01 PM, Boris Ostrovsky wrote: > On 11/01/2017 04:58 PM, Waiman Long wrote: >> +/* TODO: To be removed in a future kernel version */ >> static __init int xen_parse_nopvspin(char *arg) >> { >> - xen_pvspin = false; >> + pr_warn("xen_nopvspin is deprecated, replace it with \"pvlock_type=queued\"!\n"); >> + if (!pv_spinlock_type) >> + pv_spinlock_type = locktype_queued; > Since we currently end up using unfair locks and because you are > deprecating xen_nopvspin I wonder whether it would be better to set this > to locktype_unfair so that current behavior doesn't change. (Sorry, I > haven't responded to your earlier message before you posted this). Juergen? I think the latest patch from Juergen in tip is to use native qspinlock when xen_nopvspin is specified. Right? That is why I made the current choice. I can certainly change to unfair if it is what you guys want. > I am also not sure I agree with making pv_spinlock an enum *and* a > bitmask at the same time. I understand that it makes checks easier but I > think not assuming a value or a pattern would be better, especially > since none of the uses is on a critical path. > > (For example, !pv_spinlock_type is the same as locktype_auto, which is > defined but never used) OK, I will take out the enum and make explicit use of locktype_auto. Cheers, Longman