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: <CAM9d7cgDFfAM0YWUEt9CCJ2n5w+AcC-HB0gVZ=3EuxoapT75+w@mail.gmail.com>
Date:   Sat, 6 Feb 2021 17:06:54 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...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 06/24] perf daemon: Add config file support

On Fri, Feb 5, 2021 at 12:10 AM Jiri Olsa <jolsa@...hat.com> wrote:
>
> On Thu, Feb 04, 2021 at 09:58:19AM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Thu, Feb 04, 2021 at 09:42:35PM +0900, Namhyung Kim escreveu:
> > > Hi Jiri,
> > >
> > > On Sun, Jan 31, 2021 at 8:49 AM Jiri Olsa <jolsa@...nel.org> wrote:
> > > [SNIP]
> > > > +#define SESSION_OUTPUT  "output"
> > > > +
> > > > +/*
> > > > + * Session states:
> > > > + *
> > > > + *   OK       - session is up and running
> > > > + *   RECONFIG - session is pending for reconfiguration,
> > > > + *              new values are already loaded in session object
> > > > + *   KILL     - session is pending to be killed
> > > > + *
> > > > + * Session object life and its state is maintained by
> > > > + * following functions:
> > > > + *
> > > > + *  setup_server_config
> > > > + *    - reads config file and setup session objects
> > > > + *      with following states:
> > > > + *
> > > > + *      OK       - no change needed
> > > > + *      RECONFIG - session needs to be changed
> > > > + *                 (run variable changed)
> > > > + *      KILL     - session needs to be killed
> > > > + *                 (session is no longer in config file)
> > > > + *
> > > > + *  daemon__reconfig
> > > > + *    - scans session objects and does following actions
> > > > + *      for states:
> > > > + *
> > > > + *      OK       - skip
> > > > + *      RECONFIG - session is killed and re-run with new config
> > > > + *      KILL     - session is killed
> > > > + *
> > > > + *    - all sessions have OK state on the function exit
> > > > + */
> > > > +enum session_state {
> > > > +       SESSION_STATE__OK,
> > > > +       SESSION_STATE__RECONFIG,
> > > > +       SESSION_STATE__KILL,
> > > > +};
> > > > +
> > > > +struct session {
> > > > +       char                    *base;
> > > > +       char                    *name;
> > > > +       char                    *run;
> > > > +       int                      pid;
> > > > +       struct list_head         list;
> > > > +       enum session_state       state;
> > > > +};
> > >
> > > Although I think calling it 'session' is intuitive, it's also confusing
> > > as we already have struct perf_session...
>
> ok, how about daemon_session then?

I'm ok with it.

>
> >
> > Maybe 'struct server_session' ? If this ends up in tools/lib/perf, then
> > it gets renamed to 'struct perf_server_session', just like we have
> > 'struct perf_evsel' in libperf and 'struct evsel' in tools/perf/, right?
>
> let's have our grand-grand-grandkids worry about that ;-)

:)

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ