* Con Kolivas <kernel _at_ kolivas.org> wrote: > > for lowprio tasks they are of little use, unless you modify gcc to > > sprinkle mwait yields all around the 'lowprio code' - not very practical > > i think. > > Yuck! > > Looks like the kernel is the only thing likely to be smart enough to > do this correctly for some time yet. no, there's no way for the kernel to do this 'correctly', without further hardware help. mwait is suspending the current virtual CPU a bit better than rep-nop did. This can be exploited for the idle loop because the idle loop does nothing so it can execute the rep-nop. (mwait can likely also be used for spinlocks but that is another issue.) user-space code that is 'low-prio' cannot be slowed down via mwait, without interleaving user-space instructions with mwait (or with rep-nop). this is a problem area that is not solved by mwait - giving priority to virtual CPUs should be offered by CPUs, once the number of logical cores increases significantly - if the interaction between those cores is significant. (there are SMT designs where this isnt an issue.) Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo _at_ vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2Con Kolivas
- [PATCH] 2.6.1 Hyperthread smart "nice"Con Kolivas
- Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2Con Kolivas
- Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2Ingo Molnar
- Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2Con Kolivas
- Prev by Date: Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2
- Next by Date: Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2
- Previous by thread: Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2
- Next by thread: Re: [PATCH] 2.6.1 Hyperthread smart "nice" 2
- Indexes:[Main][Thread]