Received: from eggs.gnu.org ([2001:4830:134:3::10]:33972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqlSU-00017S-UR for qemu-devel@nongnu.org; Fri, 08 May 2015 12:49:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqlSR-0007Sk-NF for qemu-devel@nongnu.org; Fri, 08 May 2015 12:49:06 -0400 From: Alberto Garcia In-Reply-To: <554CDA71.8060606@redhat.com> References: <38be38957aff5457fd811db71706a6f645df5c7e.1430919406.git.berto@igalia.com> <554CDA71.8060606@redhat.com> Date: Fri, 08 May 2015 18:48:25 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] qcow2: use a hash to look for entries in the L2 cache List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Stefan Hajnoczi , qemu-block@nongnu.org On Fri 08 May 2015 05:46:57 PM CEST, Max Reitz wrote: > Let's assume the cache is full. Now this hash algorithm (direct mapped > cache) basically becomes futile, because the LRU algorithm (fully > associative cache) takes over That's right, although in that scenario I guess there's no good algorithm. Anyway and summarizing that I wrote in a different e-mail, I just thought that starting the lookup always from the beginning was the worst alternative and it was very easy to improve it a bit, but I don't think it has a big impact on the performance. Otherwise I would have evaluated a different data structure. Berto