Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937143AbWLDQ4A (ORCPT ); Mon, 4 Dec 2006 11:56:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S937148AbWLDQ4A (ORCPT ); Mon, 4 Dec 2006 11:56:00 -0500 Received: from omx1-ext.sgi.com ([192.48.179.11]:33543 "EHLO omx1.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S937143AbWLDQz7 (ORCPT ); Mon, 4 Dec 2006 11:55:59 -0500 Date: Mon, 4 Dec 2006 08:55:39 -0800 (PST) From: Christoph Lameter To: Eric Dumazet cc: Andrew Morton , David Miller , linux-kernel@vger.kernel.org Subject: Re: [PATCH] SLAB : use a multiply instead of a divide in obj_to_index() In-Reply-To: <200612041741.51846.dada1@cosmosbay.com> Message-ID: References: <4564C28B.30604@redhat.com> <4573B8DE.20205@redhat.com> <20061203222816.aaef93a3.akpm@osdl.org> <200612041741.51846.dada1@cosmosbay.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 727 Lines: 15 On Mon, 4 Dec 2006, Eric Dumazet wrote: > Doing some math, we can use a reciprocal multiplication instead of a divide. Could you generalize the reciprocal thingy so that the division can be used from other parts of the kernel as well? It would be useful to separately get some cycle counts on a regular division compared with your division. If that shows benefit then we may think about using it in the kernel. I am a bit surprised that this is still an issue on modern cpus. - 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/