Re: [PATCH -mm 2/6] cpu_relax(): ide_wait_stat()

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

 



Ar Mer, 2006-06-21 am 22:59 +0200, ysgrifennodd Andreas Mohr:
> Add cpu_relax() to drivers/ide/ide-iops.c/ide_wait_stat().

You don't need cpu_relax() when the loop contains a reference to
external memory busses. The CPU will stall on the inb() anyway, and when
this occurs processors with multiple-threads will do the right thing
implicitly. If you could look at the instruction stream it would look
something like

dec count
jump out if zero
inb
read request to the bus
[stall]
then to the PCI bridge
[stall]
then eventually to the device
[Huge mindbogglingly relativley long period of time stalled]
answer finally arrives back over the PCI bus
compare
...


Same comment for floppy. Rest look ok

Perhaps this needs documenting however.

Alan

-
: 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