From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJNGU-0007WS-74 for qemu-devel@nongnu.org; Fri, 28 Feb 2014 08:14:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJNGP-0003CS-Se for qemu-devel@nongnu.org; Fri, 28 Feb 2014 08:14:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJNGP-0003Bb-CS for qemu-devel@nongnu.org; Fri, 28 Feb 2014 08:14:05 -0500 Message-ID: <53108B8A.5040701@redhat.com> Date: Fri, 28 Feb 2014 06:13:46 -0700 From: Eric Blake MIME-Version: 1.0 References: <33183CC9F5247A488A2544077AF19020815D228D@SZXEMA503-MBS.china.huawei.com> In-Reply-To: <33183CC9F5247A488A2544077AF19020815D228D@SZXEMA503-MBS.china.huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BM1heM49qr1HxQElgRhi6kKD5jLoc8HKM" Subject: Re: [Qemu-devel] [PATCH 4/7] XBZRLE: rebuild the cache_is_cached function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gonglei (Arei)" , "qemu-devel@nongnu.org" Cc: Peter Maydell , Juan Quintela , "pl@kamp.de" , "owasserm@redhat.com" , "aliguori@amazon.com" , "chenliang (T)" , "pbonzini@redhat.com" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BM1heM49qr1HxQElgRhi6kKD5jLoc8HKM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/27/2014 09:10 PM, Gonglei (Arei) wrote: > Rebuild the cache_is_cached function. >=20 > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > page_cache.c | 33 +++++++++++++++------------------ > 1 file changed, 15 insertions(+), 18 deletions(-) >=20 > diff --git a/page_cache.c b/page_cache.c > index fa58ab2..34ec933 100644 > --- a/page_cache.c > +++ b/page_cache.c > @@ -121,24 +121,6 @@ static size_t cache_get_cache_pos(const PageCache = *cache, > return pos; > } > =20 > -bool cache_is_cached(const PageCache *cache, uint64_t addr, > - uint64_t current_age) Indentation was off pre-patch... > =20 > +bool cache_is_cached(const PageCache *cache, uint64_t addr, > + uint64_t current_age) =2E..but you should take the opportunity to fix it here. bool cache_is_cached(const PageCache *cache, uint64_t addr, uint64_t current_age) > + if (it->it_addr =3D=3D addr) { > + /* updata the it_age when the cache hit */ s/updata/update/ --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BM1heM49qr1HxQElgRhi6kKD5jLoc8HKM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTEIuKAAoJEKeha0olJ0NqG/YH/3/pcv30ajVWEnkE0NXDjOdh UT7rimazFgENsETeUKmUXnGfozyKc2N1Pp2tf3XQZgUCb10QtRLBl8uVQ70ur6TU Fw/GbAHLmJM+T0hE0VzzUX8Fvnmq31BGSe+N37yhfmDatsoaItQDT/ADPce5uxHa iK+hhypYLBH8gKjVAxe1bTa5HuHqLZjn0xe0us5x4DpvknMCFAdv9LTiX1U0N1xE +gaRJAzax/MdK5Zp3lqndq18EwneFcNblgPeboUekDkraFJrI2nWzHtYhpHNHg6Y AIpg6ELncrUQe++k0e2JLkO9gmTAUVkSi+U7wzIRNp/Wipj/7zUsjA4BZZ1JwMM= =qQCP -----END PGP SIGNATURE----- --BM1heM49qr1HxQElgRhi6kKD5jLoc8HKM--