[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p733b3q6818.fsf@bingen.suse.de>
Date: 27 Mar 2007 17:05:55 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Benjamin LaHaise <bcrl@...ck.org>
Cc: Christoph Hellwig <hch@...radead.org>,
Ken Chen <kenchen@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [patch] cache pipe buf page address for non-highmem arch
Benjamin LaHaise <bcrl@...ck.org> writes:
> On Fri, Mar 23, 2007 at 10:14:52AM +0000, Christoph Hellwig wrote:
> > I think you're fixing the symptom here and not the cause. If calculating
> > the virtual address of a page is so expensive on your setup it should
> > define WANT_PAGE_VIRTUAL and we should always cache the virtual address
> > in struct page. There's a lot more code, epecially in filesystems that's
> > rather upset about a slow page_address.
>
> Andi shot that down when I brought it up a while ago, as it does show
> up in profiles for networking and other code paths. His argument is that
> the loss of memory is excessive. Personally, I think the benefits of a
> 64 byte struct page on x86-64 outweigh the memory loss, as it means page
> index to address translations are a simple shift.
At some point I had plans to make virt_to_page() etc. faster
by using multiple look up tables that precompute some of the computation
depending on the caller. But it might possibly cause more cache misses
and the function didn't seem that time critical back then.
But if you can really measure it so clearly it might be worth revisiting
that.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists