Date: Sun, 1 Jun 2014 22:55:49 +0300 From: Mihai Carabas <mihai.carabas@gmail.com> To: soc-status@freebsd.org Subject: Re: [GSOC] bhyve instruction caching Message-ID: <CANg1yUu_b0qSX=2eXRaO31cogjGdSmkDnEh7PAjfVvCMsAaC1g@mail.gmail.com> In-Reply-To: <CANg1yUuazrhybHVVzi2g8vCBSTx3Z=gYmEVXvEMuj2SN%2BRY9Sg@mail.gmail.com> References: <CANg1yUuazrhybHVVzi2g8vCBSTx3Z=gYmEVXvEMuj2SN%2BRY9Sg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I will continue my status report inline. > > I will come next week with some feedback on some strategies for > caching efficiently the instructions and probably some implementation > details. The cached instruction is identified by the "struct vm*" (basically is the virtual machine ID), the CR3 value (address of the pagetable) and the IP (instruction pointer) of the instruction. All these are inserted in a new structure named "struct vie_cached". After a discussion with Neel I've decided to create a hashtable which will only use the "struct vm*" as a key. The reason is simple: if one virtual machine is trashing the instruction cache we don't want this to affect/slow down other virtual machines (one hashtable entry is guarded by a rmlock to guarantee exclusive access). A hashtable entry will point to a list of "struct vie_cached*" entries. To calculate the key of the hashtable based on the "struct vm" pointer I've used the jenkins hash [1] These days I've started a discussion with Neel about some microbenchmarking mechanisms. I will come with some more details next week. Thanks, Mihai [1] /usr/src/sys/libkern/jenkins_hash.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANg1yUu_b0qSX=2eXRaO31cogjGdSmkDnEh7PAjfVvCMsAaC1g>