Re: Performance counter API review was [patch] Performance Countersfor Linux, v3
From: Nathan Lynch
Date: Tue Feb 03 2009 - 21:33:18 EST
Paul Mackerras wrote:
>
> By the way, how does userspace get to know about cpus being added or
> removed? Is there a better way than continually reading
> /sys/devices/system/cpu/online?
The kernel generates uevents for cpu online and offline operations;
you can see them with udevmonitor. Not sure how you get those events
to an arbitrary application, though. Alternatively you can set an
inotify watch on e.g. /sys/devices/system/cpu/cpu1/online (at least it
seems to work here).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/