Revert "Revert "sched: Fix select_fallback_rq() vs cpu_active/cpu_online""

This reverts commit b5eea9f582d11eda228fe4cd3e0c525fc8dfb565.
OMAP4: PM: Fix missed PRCM MPU interrupt events

OMAP PRCM detects events with EDGE sensitivity. Edge sensitivity
requires to clear the interrupt event status bit before acknowledging
the source event.
If the source event is cleared (1) before reseting the interrupt event
status bit (2), then a subsequent source event (i.e edge) between (1)
and (2) would be missed. Then, all the source events would be kept
"masked" until the source event is cleared again.

The bug seen here is that upon two consecutive PRCM interrupt events
from the IO daisy chain source event, the second event is missed if it
occurs before the PRCM interrupt event status is cleared.
Since the IO daisy chain source event has not been acknowledged, the
subseqent events from this source are missed too.

This patch fix the PRCM interrupt handler by acknowledging the interrupt
event status bit before clearing the source event.

Change-Id: I8c43a93c3b6c7c654ddaa262b7c1c3e7385da158
Signed-off-by: Patrick Combes <p-combes@ti.com>
Signed-off-by: Cedric Poignet <c-poignet@ti.com>
sched: reduce the overhead of obtain factor
Smart wake-affine is using node-size as the factor, but the overhead of
mask operation is high.

Thus, this patch introduce the 'sd_llc_size', which will record the highest
cache-share domain size, and make it to be the new factor, in order to
reduce the overhead and make more reasonable.

And we suppose it will benefit a lot when facing a huge platform.

Test:
Tested with 12 cpu X86 server and tip 3.10.0-rc7.

pgbench    basesmart + optimization

| db_size | clients |  tps  ||  tps  |
+---------+---------+-------+   +-------+
| 22 MB   |       1 | 10598 |   | 10781 |
| 22 MB   |       2 | 21257 |   | 21328 |
| 22 MB   |       4 | 41386 |   | 41622 |
| 22 MB   |       8 | 51253 |   | 60351 |
| 22 MB   |      12 | 48570 |   | 54255 |
| 22 MB   |      16 | 46748 |   | 55534 | +18.79%
| 22 MB   |      24 | 44346 |   | 55976 | +26.23%
| 22 MB   |      32 | 43460 |   | 55279 | +27.20%
| 7484 MB |       1 |  8951 |   |  9054 |
| 7484 MB |       2 | 19233 |   | 19252 |
| 7484 MB |       4 | 37239 |   | 37354 |
| 7484 MB |       8 | 46087 |   | 51218 |
| 7484 MB |      12 | 42054 |   | 49510 |
| 7484 MB |      16 | 40765 |   | 52151 | +27.93%
| 7484 MB |      24 | 37651 |   | 52720 | +40.02%
| 7484 MB |      32 | 37056 |   | 51094 | +37.88%
| 15 GB   |       1 |  8845 |   |  9139 |
| 15 GB   |       2 | 19094 |   | 19379 |
| 15 GB   |       4 | 36979 |   | 37077 |
| 15 GB   |       8 | 46087 |   | 50490 |
| 15 GB   |      12 | 41901 |   | 48235 |
| 15 GB   |      16 | 40147 |   | 51878 | +29.22%
| 15 GB   |      24 | 37250 |   | 52676 | +41.41%
| 15 GB   |      32 | 36470 |   | 50198 | +37.64%