Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp533064ybc; Tue, 19 Nov 2019 05:23:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwN042DF3HdHbD6NeKpphNJrwD+2PGHmKCnhWIsjFvAncBP2ZAh3QHKjQiPW7LeGgddEYSq X-Received: by 2002:a17:906:e88:: with SMTP id p8mr34641421ejf.15.1574169811557; Tue, 19 Nov 2019 05:23:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574169811; cv=none; d=google.com; s=arc-20160816; b=mBKAOAfNJkGE3NhrRMdFnUxFMdLuK+CVvZ2A5o2APXuOn5hBIEkPHWD8p7QOwJvRTc e1+FlnTHDWE4jmmL7sYHz3rj+nTfEsVUp0+NGAld0h1WrnUqYB3BnbLf5XMwf23SSiQ8 rqkfR6fW+hKmHf+GDKYFQAdsfzHZhW2A4ROz5w3C9m3HrK/6DdoR3kshxI63jSb2UOBp yHjmBc9aEwWACB5xFi+vqZWPNnv6tN+XQgj0jYTIc1KLpyKQpbZJqXkv7Rer45sYsz2T pFvyQUKhPlY6iO3zl2eKqJGWKqx3qLcHP20P5ohQKhtg7QzB2PVsXSS6Xf+bjFbNAtdd 3kxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xs9skAiNsN5yQcB6U2k4KeGGCIi2Zlz3kK4x7gFDQQY=; b=lMxQ1zTG9+LjkEj/ZLVOSTgT52HV3NfjmUbaZ3w7v2diYGh0YfvdAU3G1J2m03S8mU KEBT4/0Id5MkqcBUozKsz7TKzFRMU8lbAec+xs8SBGBOyrEbnf6O3ZmFMoulPMUw2lk3 q5kwcL1LqRPLWpIuUJxYise1UqfUqYsQPKEeqlUM6JXadDTgBBe55KHxngPMozfnCkDi xm9WhsdLMvUKXCnA0IRdIi93b+njvR5PhFUcglOx2eGaPpBrP8G6BUbm1OJo6toOHG+K p7mBr58TqqxXyi1paQ4k9UmczSYjQHh/F635ECQlgsnUgM3DDftDVHetjqOEI5jVQ0DE Ikkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UOp2AlPL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si13631700eju.310.2019.11.19.05.23.04; Tue, 19 Nov 2019 05:23:31 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=UOp2AlPL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727538AbfKSNUs (ORCPT + 99 others); Tue, 19 Nov 2019 08:20:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:51044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfKSNUs (ORCPT ); Tue, 19 Nov 2019 08:20:48 -0500 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF2C3222B5; Tue, 19 Nov 2019 13:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574169648; bh=t4XReblODWNSE1CTYCwaKhK65whPDslrhtvW2X5LD8Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UOp2AlPLA0rTcaJRHCq8ceAIbKoKFyJlNmL5h4jTJEva0V1mNaB5mBWLbnoU77FGW pXMz9EdTxmLhXj2UB+SAR6UA8kxykdKvxiXBIUf/gc+8VSh6FO3Up5S1F32ZvsI9nH L4O9UBma0VCjVOFL7gT3NsR/NgJvHlT+UzAYv02U= Date: Tue, 19 Nov 2019 08:20:46 -0500 From: Sasha Levin To: Davidlohr Bueso Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH] drivers/hv: Replace binary semaphore with mutex Message-ID: <20191119132046.GE16867@sasha-vm> References: <20191101200004.20318-1-dave@stgolabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191101200004.20318-1-dave@stgolabs.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 01, 2019 at 01:00:04PM -0700, Davidlohr Bueso wrote: >At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal >than semaphores; it's also a nicer interface for mutual exclusion, >which is why they are encouraged over binary semaphores, when possible. > >Replace the hyperv_mmio_lock, its semantics implies traditional lock >ownership; that is, the lock owner is the same for both lock/unlock >operations. Therefore it is safe to convert. > >Signed-off-by: Davidlohr Bueso Queued up for hyperv-next, thank you. -- Thanks, Sasha