Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755830AbZDFJOL (ORCPT ); Mon, 6 Apr 2009 05:14:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755001AbZDFJN7 (ORCPT ); Mon, 6 Apr 2009 05:13:59 -0400 Received: from ports.donpac.ru ([80.254.111.81]:36629 "EHLO ports.donpac.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754878AbZDFJN6 (ORCPT ); Mon, 6 Apr 2009 05:13:58 -0400 Date: Mon, 6 Apr 2009 13:13:48 +0400 From: Andrey Panin To: Izik Eidus Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, avi@redhat.com, aarcange@redhat.com, chrisw@redhat.com, mtosatti@redhat.com, hugh@veritas.com, kamezawa.hiroyu@jp.fujitsu.com Subject: Re: [PATCH 4/4] add ksm kernel shared memory driver. Message-ID: <20090406091348.GA18464@ports.donpac.ru> Mail-Followup-To: Izik Eidus , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, avi@redhat.com, aarcange@redhat.com, chrisw@redhat.com, mtosatti@redhat.com, hugh@veritas.com, kamezawa.hiroyu@jp.fujitsu.com References: <1238855722-32606-1-git-send-email-ieidus@redhat.com> <1238855722-32606-2-git-send-email-ieidus@redhat.com> <1238855722-32606-3-git-send-email-ieidus@redhat.com> <1238855722-32606-4-git-send-email-ieidus@redhat.com> <1238855722-32606-5-git-send-email-ieidus@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1238855722-32606-5-git-send-email-ieidus@redhat.com> X-Uname: Linux 2.6.18-4-powerpc64 ppc64 User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 619 Lines: 21 On 094, 04 04, 2009 at 05:35:22PM +0300, Izik Eidus wrote: > +static inline u32 calc_checksum(struct page *page) > +{ > + u32 checksum; > + void *addr = kmap_atomic(page, KM_USER0); > + checksum = jhash(addr, PAGE_SIZE, 17); Why jhash2() is not used here ? It's faster and leads to smaller code size. > + kunmap_atomic(addr, KM_USER0); > + return checksum; > +} -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/