[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191119132046.GE16867@sasha-vm>
Date: Tue, 19 Nov 2019 08:20:46 -0500
From: Sasha Levin <sashal@...nel.org>
To: Davidlohr Bueso <dave@...olabs.net>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, sthemmin@...rosoft.com,
linux-kernel@...r.kernel.org, linux-hyperv@...r.kernel.org,
Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH] drivers/hv: Replace binary semaphore with mutex
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 <dbueso@...e.de>
Queued up for hyperv-next, thank you.
--
Thanks,
Sasha
Powered by blists - more mailing lists