[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101012153324.GZ13563@erda.amd.com>
Date: Tue, 12 Oct 2010 17:33:24 +0200
From: Robert Richter <robert.richter@....com>
To: Maynard Johnson <maynardj@...ibm.com>
CC: LKML <linux-kernel@...r.kernel.org>,
oprofile-list <oprofile-list@...ts.sourceforge.net>,
William Cohen <wcohen@...hat.com>,
"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>
Subject: Re: [PATCH] oprofile: disable write access to oprofilefs while
profiler is running
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@...ibm.com>
> Cc: William Cohen <wcohen@...hat.com>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@....com>
> Signed-off-by: Robert Richter <robert.richter@....com>
> ---
> drivers/oprofile/oprof.c | 19 +++++--------------
> drivers/oprofile/oprof.h | 2 +-
> drivers/oprofile/oprofile_files.c | 7 +++++--
> drivers/oprofile/oprofilefs.c | 8 ++++++--
> 4 files changed, 17 insertions(+), 19 deletions(-)
I applied the patch to oprofile/core. Maynard, thanks for review.
-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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists