davidker / unisys

Master repository for new changes to drivers/staging/unisys and drivers/visorbus
Other
2 stars 1 forks source link

visorhba interrupt_rcvd read in wait but it is never set #75

Closed mriswyth closed 8 years ago

mriswyth commented 8 years ago

visorhba's process_incoming_rsps contains a wait_event_interruptible_timeout call that is waiting for interrupt_rcvd to be equal to 1, but interrupt_rcvd is never set.

                wait_event_interruptible_timeout(
                        devdata->rsp_queue, (atomic_read(
                                             &devdata->interrupt_rcvd) == 1),
                                msecs_to_jiffies(devdata->thread_wait_ms));

This smells odd, do we think it is right? If it is then perhaps a comment is in order.

mriswyth commented 8 years ago

Kanban 1587

selltc commented 8 years ago

Unless I'm missing something, this code doesn't exist in for-later, so I'm not sure if it's worth messing with.

davidker commented 8 years ago

Yeah.. but now I'm curious about this.

Maybe that is why we have major performance issues.

davidker commented 8 years ago

Okay, so it is just forcing a poll wait before looking at the queue and a similar issue with interrupt_rcvd is happening in the visornic driver as well. Wonder if anyone will notice.

selltc commented 8 years ago

Yeah, we will still timeout every 2ms (devdata->thread_wait_ms), so we'll poll 500 times/second.

mriswyth commented 8 years ago

Since this wait is necessary now and is removed in for-later there isn't a benefit to doing anything with the current version. I noticed that for-later still contains the now unreferenced interrupt_rcvd so I'm going to create a Kanban item to remove interrupt_rcvd from for-later since for-later isn't in a state to have patches put in right now.