Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764773AbYBTSOa (ORCPT ); Wed, 20 Feb 2008 13:14:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751511AbYBTSOQ (ORCPT ); Wed, 20 Feb 2008 13:14:16 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:35771 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbYBTSOO (ORCPT ); Wed, 20 Feb 2008 13:14:14 -0500 Subject: Re: [PATCH] drivers/base: export gpl (un)register_memory_notifier From: Dave Hansen To: Jan-Bernd Themann Cc: linuxppc-dev@ozlabs.org, Christoph Raisch , Thomas Q Klein , ossthema@linux.vnet.ibm.com, Jan-Bernd Themann , Greg KH , apw , linux-kernel , Badari Pulavarty , netdev , tklein@linux.ibm.com In-Reply-To: <200802181100.12995.ossthema@de.ibm.com> References: <200802111724.12416.ossthema@de.ibm.com> <1203094538.8142.23.camel@nimitz.home.sr71.net> <200802181100.12995.ossthema@de.ibm.com> Content-Type: text/plain Date: Wed, 20 Feb 2008 10:14:02 -0800 Message-Id: <1203531242.15017.20.camel@nimitz.home.sr71.net> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1834 Lines: 38 On Mon, 2008-02-18 at 11:00 +0100, Jan-Bernd Themann wrote: > Dave Hansen wrote on 15.02.2008 17:55:38: > > > I've been thinking about that, and I don't think you really *need* to > > keep a comprehensive map like that. > > > > When the memory is in a particular configuration (range of memory > > present along with unique set of holes) you get a unique ehea_bmap > > configuration. That layout is completely predictable. > > > > So, if at any time you want to figure out what the ehea_bmap address for > > a particular *Linux* virtual address is, you just need to pretend that > > you're creating the entire ehea_bmap, use the same algorithm and figure > > out host you would have placed things, and use that result. > > > > Now, that's going to be a slow, crappy linear search (but maybe not as > > slow as recreating the silly thing). So, you might eventually run into > > some scalability problems with a lot of packets going around. But, I'd > > be curious if you do in practice. > > Up to 14 addresses translation per packet (sg_list) might be required on > the transmit side. On receive side it is only 1. Most packets require only > very few translations (1 or sometimes more) translations. However, > with more then 700.000 packets per second this approach does not seem > reasonable from performance perspective when memory is fragmented as you > described. OK, but let's see the data. *SHOW* me that it's slow. If the algorithm works, then perhaps we can simply speed it up with a little caching and *MUCH* less memory overhead. -- Dave -- 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/