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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux