Re: [PATCH] pci: aer: wait till the workqueue completes before free memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Bjorn Helgaas | 2016-01-06 17:27:58 [-0600]:

>Hi Sebastian,
Hi Bjorn,

>Your change looks reasonable.  But I'm curious about the wait_event()
>just below it.  That *looks* like it's intended to do the same thing
>as your flush_work().
Indeed.

>Can you explain why the wait_event() isn't working?  If we add the

aer_isr() invokes get_e_source() which increments rpc->cons_idx. So
the condition is valid after that and the function does not terminate
yes it invokes aer_isr_one_error().
That means if we have one CPU doing the ISR + workqueue task and another
CPU doing the aer_remove() removal thingy then the latter CPU evaluates
the condition to true and continues cleanup while the former is still in
aer_isr_one_error() wondering where the memory went.

>flush_work(), can we remove the wait_event() stuff?

I think so since its only purpose is to sync against removal which does
not work on SMP. So let me remove this and the wait_release member.

>Bjorn

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux