"Ken Chen" <[EMAIL PROTECTED]> 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to