lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210119174901.GD1717058@krava>
Date:   Tue, 19 Jan 2021 18:49:01 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Ingo Molnar <mingo@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Michael Petlan <mpetlan@...hat.com>,
        Ian Rogers <irogers@...gle.com>,
        Stephane Eranian <eranian@...gle.com>,
        Alexei Budankov <abudankov@...wei.com>
Subject: Re: [PATCH 08/22] perf daemon: Add config file change check

On Tue, Jan 19, 2021 at 02:31:55PM +0900, Namhyung Kim wrote:
> On Sun, Jan 3, 2021 at 7:05 AM Jiri Olsa <jolsa@...nel.org> wrote:
> >
> > Adding support to detect daemon's config file changes
> > and re-read the configuration when that happens.
> 
> Hmm.. maybe some of the code in the previous commit can be moved here.

do you mean the config file support?

I think this patch is quite small and straightforward - adds
the inotify processing for checking config change

perhaps we can separate some of the code from previous commit,
and make it simpler, I'll check

thanks,
jirka

> 
> Thanks,
> Namhyung
> 
> >
> > Using inotify file descriptor pluged into the main
> > fdarray object for polling.
> >
> > Example:
> >
> >   # cat ~/.perfconfig
> >   [daemon]
> >   base=/opt/perfdata
> >
> >   [session-cycles]
> >   run = -m 10M -e cycles --overwrite --switch-output -a
> >
> > Starting the daemon:
> >
> >   # perf daemon start
> >
> > Check sessions:
> >
> >   # perf daemon
> >   [772262:daemon] base: /opt/perfdata
> >   [772263:cycles] perf record -m 10M -e cycles --overwrite --switch-output -a
> >
> > Change '-m 10M' to '-m 20M', and check daemon log:
> >
> >   # tail -f /opt/perfdata/output
> >   [2021-01-02 20:31:41.234045] daemon started (pid 772262)
> >   [2021-01-02 20:31:41.235072] reconfig: ruining session [cycles:772263]: -m 10M -e cycles --overwrite --switch-output -a
> >   [2021-01-02 20:32:08.310137] reconfig: session 'cycles' killed
> >   [2021-01-02 20:32:08.310847] reconfig: ruining session [cycles:772338]: -m 20M -e cycles --overwrite --switch-output -a
> >
> > And the session list:
> >
> >   # perf daemon
> >   [772262:daemon] base: /opt/perfdata
> >   [772338:cycles] perf record -m 20M -e cycles --overwrite --switch-output -a
> >
> > Note the changed '-m 20M' option is in place.
> >
> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> > ---
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ