From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 537F8C432C0 for ; Tue, 19 Nov 2019 13:20:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26B92222C2 for ; Tue, 19 Nov 2019 13:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574169649; bh=t4XReblODWNSE1CTYCwaKhK65whPDslrhtvW2X5LD8Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=bviIX1xe5+o4mireTVLIHBdJKLlVx1+z5CbCTom5+yXxdovswIG6cfhbTU6hkglSt x5K+Yqj1unIQLSXKdLrQsN40nd8on6ANtU5xwzHPf4GTpmown/yWuMMadP+CWXnHDT ExbqSjRjuWevnVff9vktxVBD8m+cVcPcqdPmcHhg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726369AbfKSNUs (ORCPT ); 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-hyperv-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@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