I had a minor nit, because I thought that it does make sense
to simplify this loop
touch_all_nmi_watchdogs:
...
for_each_present_cpu(cpu) {
if (per_cpu(watchdog_nmi_touch, cpu) != true)
per_cpu(watchdog_nmi_touch, cpu) = true;
}
to
for_each_present_cpu(cpu) {
per_cpu(watchdog_nmi_touch, cpu) = true;
}
Andrew Morton wrote in responce:
We sometimes do this trick to avoid dirtying lots of cachelines
which already held the correct value. It'll be extra-benefical
when dealing with other CPU's data, I expect.
This is really reasonable. Once again, try to think in opposite
each time you make a decision.
No comments:
Post a Comment