Re: [PATCH] oprofile: disable write access to oprofilefs whileprofiler is running

From: Robert Richter
Date: Tue Oct 05 2010 - 06:43:19 EST


On 05.10.10 06:36:57, Robert Richter wrote:
> Oprofile counters are setup when profiling is disabled. Thus, writing
> to oprofilefs has no immediate effect. Changes are updated only after
> oprofile is reenabled.
>
> To keep userland and kernel states synchronized, we now allow
> configuration of oprofile only if profiling is disabled. In this case
> it checks if the profiler is running and then disables write access to
> oprofilefs by returning -EBUSY. The change should be backward
> compatible with current oprofile userland daemon.
>
> Cc: Maynard Johnson <maynardj@xxxxxxxxxx>
> Cc: William Cohen <wcohen@xxxxxxxxxx>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> Signed-off-by: Robert Richter <robert.richter@xxxxxxx>

Maynard, please ack if you are fine with it.

Thanks,

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
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/