Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

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

 



Alan Cox wrote:
>>> Now if we are unlucky and the IRQ gets in between the last byte of
>>> transfer and clearing the active ignore IRQ flag we will still run the
>>> completion handler
>> I don't really get this.  What happens if the IRQ is shared and the
>> other device raises interrupt while the data transfer is still in
>> progress?  What prevents it from running the completion routine?
[--snip--]
> c) the IRQ beats the clearing of the ignore irq flag in which case it
> won't execute the handler but the data transfer path will

This case is where I fail to understand how it's supposed to work.  If
IRQ beats the clearing of the ignore irq flag && execution of completion
routine from wq, it ignores the IRQ, right?  The IRQ line remains
asserted, so when the IRQ handler finishes, it's entered again
immediately till nobody-cared kicks in and completely disable the IRQ
line.  ie.

	clear_bit(COMPLETION_RUN, ->flags);
	xfer bytes
	>> IRQ hits here
	if (test_and_set_bit(COMPLETION_RUN, ->flags) == 0)
		run_completion_routine();
	->active-ignore-irq = 0;

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux