[ewg] Re: [PATCH] IB/ehca: Serialize HCA-related hCalls on POWER5

2007-12-07 Thread Arnd Bergmann
On Thursday 06 December 2007, Roland Dreier wrote:
   Regarding the performance problem, have you checked whether converting all
   your spin_lock_irqsave to spin_lock/spin_lock_irq improves your performance
   on the older machines? Maybe it's already fast enough that way.
 
 It does seem that the only places that the hcall_lock is taken also
 use msleep, so they must always be in process context.  So you can
 safely just use spin_lock(), right?

I think it needs some more inspection. The msleep in there is only called
for hcalls that return H_IS_LONG_BUSY(). In theory, you can call
ehca_plpar_hcall_norets() from inside an interrupt handler if the
hcall in question never returns long busy.

Arnd 
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg


[ewg] Re: [PATCH] IB/ehca: Serialize HCA-related hCalls on POWER5

2007-12-06 Thread Arnd Bergmann
On Thursday 06 December 2007, Joachim Fenkes wrote:
 printk(KERN_INFO eHCA Infiniband Device Driver 
        (Version  HCAD_VERSION )\n);
  
 +   /* Autodetect hCall locking -- we can't read the firmware version
 +    * directly, but we know that starting with POWER6, all firmware
 +    * versions are good.
 +    */
 +   if (ehca_lock_hcalls == -1)
 +   ehca_lock_hcalls = !(cur_cpu_spec-cpu_user_features
 +         PPC_FEATURE_ARCH_2_05);
 +
 ret = ehca_create_comp_pool();
 if (ret) {
 ehca_gen_err(Cannot create comp pool.);

We already talked about this yesterday, but I still feel that checking the
instruction set of the CPU should not be used to determine whether a
specific device driver implementation is used int hypervisor.

At the very least, I think you should change this to read the hypervisor
version number from the device tree, though the ideal solution would be
to have the absence of this bug encoded in the device node for the ehca
device itself.

Regarding the performance problem, have you checked whether converting all
your spin_lock_irqsave to spin_lock/spin_lock_irq improves your performance
on the older machines? Maybe it's already fast enough that way.

Arnd 
___
ewg mailing list
ewg@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg