Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

2007-02-15 Thread Hoang-Nam Nguyen
Hi, > So I'm holding off on applying this for now. Please think it over and > either tell me the current patch is OK, or fix it up. There's not > really too much urgency because a change like this is something I > would be comfortable merging between 2.6.21-rc1 and -rc2. You're absolutely right.

Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

2007-02-15 Thread Roland Dreier
Looking at this one more time, I think it actually may be buggy: > @@ -147,6 +147,7 @@ struct ib_cq *ehca_create_cq(struct ib_d > spin_lock_init(&my_cq->spinlock); > spin_lock_init(&my_cq->cb_lock); > spin_lock_init(&my_cq->task_lock); > +init_completion(&my_cq->zero_callba

[PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

2007-02-15 Thread Hoang-Nam Nguyen
remove yield() and use wait_for_completion() in order to wait for running completion handlers finished before destroying associated completion queue Signed-off-by: Hoang-Nam Nguyen <[EMAIL PROTECTED]> --- ehca_classes.h |3 +++ ehca_cq.c |5 +++-- ehca_irq.c |6 +- 3 f

Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

2007-02-14 Thread Roland Dreier
I agree with Christoph -- the use of wait_for_completion() in a loop makes no sense. When you send a new copy of this patch without whitespace damage, please fix that up too... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] M

Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

2007-02-14 Thread Christoph Hellwig
> @@ -332,7 +333,7 @@ int ehca_destroy_cq(struct ib_cq *cq) > spin_lock_irqsave(&ehca_cq_idr_lock, flags); > while (my_cq->nr_callbacks) { > spin_unlock_irqrestore(&ehca_cq_idr_lock, flags); > - yield(); > + wait_for_completion(&my_cq->zer

[PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()

2007-02-14 Thread Hoang-Nam Nguyen
Hi, this patch removes yield() and uses wait_for_completion() in order to wait for running completion handlers finished before destroying associated completion queue. Thanks Nam Signed-off-by: Hoang-Nam Nguyen <[EMAIL PROTECTED]> --- ehca_classes.h |3 +++ ehca_cq.c |3 ++- ehca_i