Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756886AbXERMHX (ORCPT ); Fri, 18 May 2007 08:07:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754633AbXERMHK (ORCPT ); Fri, 18 May 2007 08:07:10 -0400 Received: from ns.suse.de ([195.135.220.2]:52564 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754443AbXERMHI (ORCPT ); Fri, 18 May 2007 08:07:08 -0400 From: Andi Kleen To: Nick Piggin Subject: Re: [rfc] increase struct page size?! Date: Fri, 18 May 2007 14:06:39 +0200 User-Agent: KMail/1.9.1 Cc: Linux Kernel Mailing List , Linux Memory Management List , linux-arch@vger.kernel.org References: <20070518040854.GA15654@wotan.suse.de> In-Reply-To: <20070518040854.GA15654@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705181406.39702.ak@suse.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1310 Lines: 31 > > I'd say all up this is going to decrease overall cache footprint in > fastpaths, both by reducing text and data footprint of page_address and > related operations, and by reducing cacheline footprint of most batched > operations on struct pages. I suspect the cache line footprint is not the main problem here (talking about only one other cache line), but the potential latency of fetching the other half. One possible alternative instead of increasing struct page would be to identify places that commonly touch a page first (e.g. using oprofile) and then always add a prefetch() there to fetch the other half of the page early. prefetch on something that is already in cache should be cheap, so for the structs that don't straddle cachelines it shouldn't be a big overhead. I don't think doing the ->virtual addition will buy very much, because at least the 64bit architectures will probably move towards vmemmap where pfn->virt is quite cheap. Of course the real long term fix for struct page cache overhead would be larger soft page size. -Andi - 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/