public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: "Ken Chen" <kenchen@google.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch] cache pipe buf page address for non-highmem arch
Date: 27 Mar 2007 17:01:01 +0200	[thread overview]
Message-ID: <p737it2689e.fsf@bingen.suse.de> (raw)
In-Reply-To: <b040c32a0703221751x54417524l5237742f345eeda9@mail.gmail.com>

"Ken Chen" <kenchen@google.com> writes:

> It is really sad that we always call kmap and friends for every pipe
> buffer page on 64-bit arch that doesn't use HIGHMEM, or on
> configuration that doesn't turn on HIGHMEM.
> 
> The effect of calling kmap* is visible in the execution profile when
> pipe code is being stressed.  It is especially true on amd's x86-64
> platform where kmap() has to traverse through numa node index
> calculation in order to convert struct page * to kernel virtual
> address.  

What is the problem? You have cache misses on the the hash table
or are the instructions really an issue on a modern CPU?

e.g. i out of lined virt_to_page to save space, but it could be probably
inlined again if it was severly time critical. 

> +
> +#ifdef CONFIG_HIGHMEM
> +#define pipe_kmap		kmap
> +#define pipe_kmap_atomic	kmap_atomic

I think it would be better to have a somewhat generic kmap_caching() 
or similar interface that could be used by more subsystems.

-Andi


  parent reply	other threads:[~2007-03-27 14:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23  0:51 [patch] cache pipe buf page address for non-highmem arch Ken Chen
2007-03-23  1:01 ` Andrew Morton
2007-03-24  0:48   ` Ken Chen
2007-03-27  4:15     ` Andrew Morton
2007-03-27 17:47       ` Ken Chen
2007-03-27 22:57         ` Zach Brown
2007-03-28 23:14           ` Andrew Morton
2007-03-28 23:21             ` Zach Brown
2007-03-28 23:34               ` Andrew Morton
2007-03-28 23:48                 ` Jeremy Fitzhardinge
2007-03-23 10:14 ` Christoph Hellwig
2007-03-24  1:01   ` Ken Chen
2007-03-24  1:40   ` Benjamin LaHaise
2007-03-27 15:05     ` Andi Kleen
2007-03-27 15:01 ` Andi Kleen [this message]
2007-03-27 18:06   ` Ken Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p737it2689e.fsf@bingen.suse.de \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox