From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 1/6] xenbus: Support HVM backends Date: Mon, 19 Dec 2011 14:23:54 -0500 Message-ID: <20111219192354.GA5413@phenom.dumpdata.com> References: <1323893534-436-1-git-send-email-dgdegra@tycho.nsa.gov> <1323893534-436-2-git-send-email-dgdegra@tycho.nsa.gov> <20111216195620.GB26802@andromeda.dapyr.net> <4EEF7993.2060301@tycho.nsa.gov> <20111219181655.GA3832@phenom.dumpdata.com> <4EEF866F.1030002@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4EEF866F.1030002@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel De Graaf Cc: Konrad Rzeszutek Wilk , Xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > >>>Then these 'xenbus_map_ring_valloc' end up just using the > >>>ring_ops->map call. > >> > >>Is the reason for doing this just to avoid overhead? The overhead from > >>an indirect function call is much higher than from an integer comparison > >>(which is what xen_pv_domain resolves to). In this case, the _pv and _hvm > >>functions are both inlined into the dispatch function. > > > >Do we care about that? How often are these calls made? > > Not all that often - domain creation and destruction or device plug/unplug. > So performance doesn't really matter. Is there a reason to prefer an _ops > structure for this instead of direct calls? Looks cleaner and fits the bill of where the rest of the Linux kernel is going with using func structs for most everything.